User Groups and Privileges

Results 1 to 2 of 2

Thread: User Groups and Privileges

  1. #1
    Join Date
    Dec 1969

    Default User Groups and Privileges

    I am making a web based application that will have different user groups and privileges. Most of the pages in the application are web forms that interface with a database. Different groups will have different privileges on each of the fields in the form. I was curious how other people have programmed user groups and privileges into their pages?<BR><BR>So far, I have had to hard code each group into the database (a boolean field if the user is an admin, a boolean field if they are in sales, etc.) When the user session starts, I create a session variable that says (admin=true, sales=false, etc). When the web form is displayed, I check the session variable to see if this user can edit this field. I realize this will not be a good way to do things when I have multiple groups with varying privileges.<BR><BR>What are some other suggestions on how to do this?

  2. #2
    Join Date
    Dec 1969

    Default RE: User Groups and Privileges

    One way would be to assign a number value to each level. If level 1 is the highest then set the variable for a particular value. Do the same for the other levels. The on any other pages check for the variable value.<BR><BR>If varible = 1 Then<BR>whatever<BR>end if<BR>If variable = 2 Then<BR>something else<BR><BR>and so on.<BR><BR>Hope that helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts