User level grant access

Results 1 to 2 of 2

Thread: User level grant access

  1. #1
    Join Date
    Dec 1969

    Default User level grant access

    I have an existing login page that would allow a single user to access all forms. Could you me an idea or code (ASP) that would give 5 users different level of access to different forms. like User A would have access to all forms. User B would only view this form etc..

  2. #2
    Join Date
    Dec 1969

    Default Several ways...

    But the easiest might be to have a field in the DB called "levels" and have that be a string.<BR><BR>So then you would do:<BR><BR>&#060;%<BR>... after validating the user ...<BR><BR>Session("Levels") = RS("Levels")<BR>...<BR>%&#062;<BR><BR>And then, on any page where you needed to check the levels, do something like:<BR><BR>&#060;%<BR>If InStr( Session("Levels"), "A" ) = 0 Then<BR> Response.Write "You are not authorized to use this page."<BR> Response.End<BR>End If<BR>%&#062;<BR><BR>So the string in Levels is just "AC" or "ADE" or "ABCDE" or whatever. Just include all the letters that are appropriate for that user.<BR><BR>This isn&#039;t a "normalized" answer--for that you should have a separate access table with each access code per user in a separate records. But I suspect that this will do the job and will be easier to code and manage. You can use any characters you want in the string--letter, numbers, symbols, etc.<BR><BR>

Posting Permissions

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