how do i implement 'userlevels'?

  • Thread starter Thread starter ohmmega
  • Start date Start date
O

ohmmega

simple question:

is there a easy way to implement different user levels (hiding buttons
and such stuff)?

regards
rené p.
 
This is about the third time you have asked this question, and I have
answered, as well as another person. Were those responses not what you were
looking for? If so, what is it that you are looking for?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

simple question:

is there a easy way to implement different user levels (hiding buttons
and such stuff)?

regards
rené p.
 
i apologize for the inconvenience caused, but somehow googlegroups
isn't able to show me my postings. therefore i'm really sorry that i
couldn't read and answer to your postings :(

it's weird - but for me it's not even possible to follow the link to
my old message in your answer - i only get a "not found" message. i'm
i really that dumb or is it just google?
 
Quote:
Rene,

You could use attributes, but you need some sort of pattern.
Basically, this is what code access security does, as you specify a role
that the current user has to be in to access the method/property, etc,
etc.

What you could do is create an attribute of your own, and specify what
roles should be able to access which parts of the user interface. Then,
you can cycle through all the controls when the form is popped up,
checking the role of the current user vs the attribute, and delete the
control or set the visibility to false.

And I'd highly recommend accessing the attributes only once, and creating a
collection of the controls for each user level, and using that collection
each time the user changes. Reflection is slow.

the question is if i should use attributes. i also thought about using
the TAG field in each control. wouldn't that be quicker then
reflection?
there is also a problem with adding controls to a collection. there is
already a list with buttons for each userlevel (should be changeable).
thought about cycling through the list at startup - setting the TAG
fields and if the user logs on - again cycling through the controls
and set's them invisible.

so my question in detail: are attributes the common way to implement
userlevels? and: is there a common way?

thank's again
 
i apologize for the inconvenience caused, but somehow googlegroups
isn't able to show me my postings. therefore i'm really sorry that i
couldn't read and answer to your postings :(

it's weird - but for me it's not even possible to follow the link to
my old message in your answer - i only get a "not found" message. i'm
i really that dumb or is it just google?

I'm using Gougle Groups as well. Work fine most of the time, however
sometimes posts magically disappear.
 
i found my "lost" posts via google (not groups) in a completly
different forum/newsgroup (other page, other server). i think this
happens if the addition/followup string (in german it's nachtrag) is
set to something else (however) - that's a problem because usually
it's a hidden field in the header *damn*. but i'm eased that i'm not
the only one with problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top