473,473 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Different Type of User Pattern

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
May 4 '07 #1
1 1150
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]
- mv*@spam.guard.caspershouse.com

"Craig" <Cr***@discussions.microsoft.comwrote in message
news:78**********************************@microsof t.com...
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

May 4 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Patrick J. Maloney | last post by:
I received a file from a business partner. I ran it through XercesJ and it choked on the following element: <wcb-case-number>0</wcb-case-number> To debug this issue, I loaded it into XMLSPY...
1
by: Spike | last post by:
Hello! Im going to make a javascript for changing alot of images. But im not sure how to do it., where to start.. Ok, first.. this is the isue. I have 3 images(I call them 1a-3a). when u...
2
by: Th.-Fischer | last post by:
hi, i have this xml structure <users> <user id="root"/> <!-- mandatory! --> <user id="a"/> <!-- optional --> <user id="b"/> <!-- optional --> <user id="c"/> <!-- optional -->...
10
by: Alfonso Morra | last post by:
This may be considered as OT since the C++ Standard says not one word about threads. Nevertheless, C++ is routinely and widely used to write solid multithreaded code. I wondered if anyone has...
2
by: namo | last post by:
Hello, I have started a small simulation project to learn C++ and I am faced with the following problem : the user can choose at runtime to simulate protocol P1 or P2. P1 uses packets of type...
21
by: Darin | last post by:
I have an applicatoin that works 100% perfect when running on a machine setup for English (United States), but when I change it to Spanish (Mexico), the dates start giving me fits. THe reason is...
1
by: Christopher | last post by:
The observer pattern itself is easy enough. I've implemented it using a Event that contains data for any Event type I forsee my application using. My problem is I don't want one and only one...
9
by: raylopez99 | last post by:
Here are two different ways of achieving a mediator pattern: the first, using circular references (for lack of a better way to describe it), but not using delegates, with the second using...
2
by: alireza6485 | last post by:
Hi: I have 3 class/Methods: the first one:just beeps the second one:ask the user to Enter the number of beep The last one:Activate and runs. I get the following Error:"instance reference;...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.