Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8807073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:17:08+00:00 2026-06-14T02:17:08+00:00

I have a desktop application developed in WPF that has several views displayed as

  • 0

I have a desktop application developed in WPF that has several views displayed as MDI child to the Shell. It is not developed in a Composite/Modularized approach. When the application opens, all the views are ready to be accessed. The application has an Admin user and several Operators.

The requirement is that the Admin user will assign some restricted privileges to the Operators which will specify –

  1. Which Operators can access/open which Views, and
  2. Which Operators can perform which actions in the allowed Views

My thought up to this point is to –

  1. Storing the operator-privilege information in the database
  2. On loading, storing the currently logged-in user’s privilege info at somewhere application-level
  3. For the Shell, checking the privilege info at application-level and setting visibility bindings to different View-access buttons according to the info
  4. For individual Views, checking the privilege info at ViewModel-level and setting visibility bindings to the action buttons according to the info

Is there a better approach for implementing such a scenario?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:17:09+00:00Added an answer on June 14, 2026 at 2:17 am

    Your approach sounds like pretty much OK to me, except for the fact that in addition to hiding several UI elements such as buttons, I would also do checking if operations can be performed by the current user in the ViewModel layer, before actually executing them.

    This means that your Commands should have a CanExecute() that goes thru your permission validation logic and returns true or false. This is an important security measure, IMO, because UIElements can easily be altered at runtime using tools such as Snoop.
    Take a look at this answer How to Snoop proof your wpf application?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a C# 4.0 desktop application that uses a SQL Server Express
I have developed a desktop database application. But the interface is not rich. So
I have developed a desktop application. Now in that app I want to add
We've developed a desktop application using .NetFX3.5 which has some winforms and two WPF
My company has developed a .net 4 WPF application that connects to our manufacturing
We have a desktop client application developed in Swing. This application interacts with backend
I have a desktop application where the user has a library of encrypted ZIP
I have a desktop application that will 'sync' with an iPhone application. The sync
I have a desktop application that needs to upload/download images to/from service computer over
I have a desktop application (C# .NET 3.5) that uses a SQL server for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.