473,507 Members | 4,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how do i implement 'userlevels'?

simple question:

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

regards
rené p.

Jul 21 '07 #1
5 1376
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]
- mv*@spam.guard.caspershouse.com

"ohmmega" <sh****@gmx.atwrote in message
news:11**********************@r34g2000hsd.googlegr oups.com...
simple question:

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

regards
rené p.

Jul 21 '07 #2
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?

Jul 23 '07 #3
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

Jul 24 '07 #4
On Jul 23, 10:17 am, ohmmega <sho...@gmx.atwrote:
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.

Jul 24 '07 #5
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.

Jul 25 '07 #6

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

Similar topics

6
3800
by: Charles Law | last post by:
This is going to seem like a basic OO question, but it comes up and bites me every now and again. Suppose we have a multi-tiered protocol to implement, what is the logical, OO way to design the...
2
4810
by: Billy Porter | last post by:
Greetings, I got a class that wraps the System.Data.SqlClient.SqlConnection class (no COM interaction). I'm not sure if I'm supposed to implement the IDisposable pattern for this wrapper or not....
4
3692
by: Sanjay Vyas | last post by:
Sorry, forgot to cross post this one.. This is rather unusual as we would expect any Collection class to implement ICollection interface and furthermore a Dictionary class should implement...
4
17166
by: Peter | last post by:
I want to copy a parent class instance's all datas to a child's. It's actually a C++'s copy constructor. But why the following code does not work - there is a compile error! How it should look...
3
2700
by: Brett Hall | last post by:
I have a VB.NET interface that my managed C++ code is to implement. I seem to be stuck implementing an event defined in that interface. Does anyone have a simple code snippet that will show me...
5
19560
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
7
15637
by: moondaddy | last post by:
If I'm in a class that inherits an interface, is there a shortcut key that will write the implementation of the interface into the class? I remember seeing something like this in vb.net. ...
0
2812
by: emin.shopper | last post by:
I had a need recently to check if my subclasses properly implemented the desired interface and wished that I could use something like an abstract base class in python. After reading up on metaclass...
5
2378
by: Tony Johansson | last post by:
Hello! Assume you have the following interface and classes shown below. It is said that a class must implement all the methods in the interface it inherits. Below we have class MyDerivedClass...
0
7220
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
7105
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
7371
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...
0
7479
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5037
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
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
410
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.