PC Review


Reply
Thread Tools Rate Thread

Different Type of User Pattern

 
 
=?Utf-8?B?Q3JhaWc=?=
Guest
Posts: n/a
 
      4th May 2007
What's the best design/pattern to use for a windows app that has different
types of users, and where different things happen according to what type of
user you are.

For example: If you're User A then a button will be visible, however if
you're user B, then that button will not be visible. But on a much larger
scale than this example.

Thanks
 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      4th May 2007
Criag,

Well, the pattern that is already establised uses implementations of the
IPrincipal object. A principal can be in different roles, and you can check
that principal at any point (you can get it off the current thread).

Basically, you would get your IPrincipal implementation, and then check
to see if it is in the role you specify. If it is, you perform your action,
if not, you perform some other action (like enabling/disabling a control).


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Craig" <(E-Mail Removed)> wrote in message
news:787FEA9C-E565-495A-AB80-(E-Mail Removed)...
> What's the best design/pattern to use for a windows app that has different
> types of users, and where different things happen according to what type
> of
> user you are.
>
> For example: If you're User A then a button will be visible, however if
> you're user B, then that button will not be visible. But on a much larger
> scale than this example.
>
> Thanks



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MVP pattern and application/user settings in WinForm Napoleone1981 Microsoft C# .NET 3 12th Dec 2008 02:33 PM
word 2007 cant remove blue grid type pattern appearing on docs AEM Microsoft Word Document Management 1 29th Apr 2008 01:03 PM
Serialize a Strategy Pattern List of objects with out xsi:type. =?Utf-8?B?VG9tIEtydWVnZXI=?= Microsoft Dot NET Framework 7 15th Jun 2006 09:03 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Microsoft Excel Programming 1 31st Oct 2005 08:20 PM
Type casting object type to user defined class or interface Programmer Microsoft C# .NET 6 17th Jan 2004 08:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:06 PM.