Objects by Design Forums Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home  
Objects by Design Forums : Powered by vBulletin version 2.3.5 Objects by Design Forums > Main Forums > Object-Oriented Design and Patterns > OO Design User Access Rights
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
tkat
Junior Member

Registered: Dec 2003
Location:
Posts: 4

OO Design User Access Rights

Hi yall,
I'm fairly new to OO design as well as this form.
I'm designing this application which has different kinds of users. There are admins, power users and regular users which all will have different rights. Now, when i'm drawing out my class diagram, I'm wondering if I should make each different kind of user its own class. But, if I think about it some more, the different kinds of users could almost just be an attribute of that class. For example, I could have a simple class named user and and a variable called 'isAdmin' as a boolean and that would determine if they have certain rights in the app. But the problem with this approach is that everywhere i would have to test for if 'isAdmin' is true. But wouldn't this be the same problem if i went for the every user type have its own class?
If i would create a different class for every user type, then I could make an interface that all the classes would implement and also have each class have its own unique functions. But there won't be that many AT all.

I'm just wondering how some of you work around this. Your suggestions/comments would be greatly appreciated.

thx

Report this post to a moderator | IP: Logged

Old Post 12-16-2003 03:31 PM
tkat is offline Click Here to See the Profile for tkat Click here to Send tkat a Private Message Find more posts by tkat Add tkat to your buddy list Edit/Delete Message Reply w/Quote
tkat
Junior Member

Registered: Dec 2003
Location:
Posts: 4

issue resolved. thx anyways.

Report this post to a moderator | IP: Logged

Old Post 12-19-2003 07:28 PM
tkat is offline Click Here to See the Profile for tkat Click here to Send tkat a Private Message Find more posts by tkat Add tkat to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 01:02 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

< Contact Us - Objects by Design >

Powered by: vBulletin Version 2.3.5
Copyright ©2000 - 2017, Jelsoft Enterprises Limited.
Copyright 1999-2005, Objects by Design, Inc.