Click here to Skip to main content
15,891,529 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: XSS-CGI-RFI-SQL Injection Scanner Project Help Pin
Fuat Mx26-Dec-09 21:27
Fuat Mx26-Dec-09 21:27 
QuestionIntegrating scripting languages with "low-level" languages. Pin
Leslie Sanford1-Oct-08 19:45
Leslie Sanford1-Oct-08 19:45 
AnswerRe: Integrating scripting languages with "low-level" languages. Pin
led mike2-Oct-08 5:27
led mike2-Oct-08 5:27 
QuestionImplementing Model View Presenter Pin
Giorgi Dalakishvili30-Sep-08 22:18
mentorGiorgi Dalakishvili30-Sep-08 22:18 
AnswerRe: Implementing Model View Presenter Pin
stavinski1-Oct-08 3:29
stavinski1-Oct-08 3:29 
GeneralRe: Implementing Model View Presenter Pin
Giorgi Dalakishvili2-Oct-08 22:41
mentorGiorgi Dalakishvili2-Oct-08 22:41 
QuestionDesign solution for .NET application. Pin
xbuster28-Sep-08 3:11
xbuster28-Sep-08 3:11 
Questioncreating a _simple_ fine grained user based security system Pin
giddy_guitarist27-Sep-08 6:37
giddy_guitarist27-Sep-08 6:37 
hi,

(I want someone to check if my idea is utterly stupid or ok??)

I have a mid complex app for a hotel that needs a fine grained user security system. In other words an admin should be able to deny/grant specific access to users like Ability to make a Reservation or the ability to print reports.

Now, I'm thinking the business objects could take something like:

enum UserPrivileges { various privileges....... };

IPrivilegedUser
{
public UserPrivileges Privileges
{
get;
}
}

The user class inherits from this interface, the business objects could take this user in a function and return true/false as per the needed privileges, or maybe throw an exception:

User user1 = new User(); //class User inherits from IPrivilegedUser and loads the right privileges from the DB
Reservations.LoadPrivileges(user1);//check the returned value..??
Reservations.EditReservation() // calling this should fail if the privileges are not enough!?

Is this a good enough design, will it break apart somewhere or is there a better way to do this?

Declarative security like CAS in .NET would be an overkill since its not a very large app, but I do need the design to be flexible enough so that if the app does grow big I'm not in a mess.

Thanks

Gideon
AnswerRe: creating a _simple_ fine grained user based security system Pin
Pete O'Hanlon27-Sep-08 8:54
mvePete O'Hanlon27-Sep-08 8:54 
GeneralRe: creating a _simple_ fine grained user based security system Pin
giddy_guitarist27-Sep-08 20:22
giddy_guitarist27-Sep-08 20:22 
GeneralRe: creating a _simple_ fine grained user based security system Pin
Pete O'Hanlon28-Sep-08 9:21
mvePete O'Hanlon28-Sep-08 9:21 
GeneralRe: creating a _simple_ fine grained user based security system Pin
giddy_guitarist5-Oct-08 7:39
giddy_guitarist5-Oct-08 7:39 
QuestionCreating 3-Tier system, technology to use. Pin
RDoes26-Sep-08 1:06
RDoes26-Sep-08 1:06 
AnswerRe: Creating 3-Tier system, technology to use. Pin
Pete O'Hanlon26-Sep-08 5:00
mvePete O'Hanlon26-Sep-08 5:00 
GeneralRe: Creating 3-Tier system, technology to use. Pin
RDoes29-Sep-08 1:00
RDoes29-Sep-08 1:00 
GeneralRe: Creating 3-Tier system, technology to use. Pin
Pete O'Hanlon29-Sep-08 1:57
mvePete O'Hanlon29-Sep-08 1:57 
QuestionC# reflection? Pin
ppayal26-Sep-08 0:58
ppayal26-Sep-08 0:58 
QuestionCitrix: Windows Forms Color Depth Pin
pierrecor24-Sep-08 21:40
pierrecor24-Sep-08 21:40 
QuestionInversion of Control in Compilers? Pin
Philip Laureano20-Sep-08 3:18
Philip Laureano20-Sep-08 3:18 
AnswerRe: Inversion of Control in Compilers? Pin
Pete O'Hanlon20-Sep-08 11:39
mvePete O'Hanlon20-Sep-08 11:39 
GeneralRe: Inversion of Control in Compilers? Pin
Paul Conrad20-Sep-08 11:56
professionalPaul Conrad20-Sep-08 11:56 
QuestionOpinions about user identification in multi-tier environment Pin
Wendelius19-Sep-08 9:40
mentorWendelius19-Sep-08 9:40 
AnswerRe: User identification in multi-tier environment Pin
Scott Dorman19-Sep-08 10:43
professionalScott Dorman19-Sep-08 10:43 
GeneralRe: User identification in multi-tier environment Pin
Wendelius19-Sep-08 10:50
mentorWendelius19-Sep-08 10:50 
GeneralRe: User identification in multi-tier environment Pin
Scott Dorman19-Sep-08 10:55
professionalScott Dorman19-Sep-08 10:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.