Forums

This topic is locked

Multiple access privileges

Posted 09 Jan 2006 16:10:18
1
has voted
09 Jan 2006 16:10:18 E. Bar posted:
I have 3 authorization levels: User 1 have total privileges. Users 2 and 3 can view only data from companies 2 and 3. Now I need to create a fourth privilege where user 4 can access data from companies 1, 3 and 4 (and not company 2). How modify this code:

<%
Dim RScompanyResults__MM_UserAuthorization
RScompanyResults__MM_UserAuthorization = "1"
If (Session("MM_UserAuthorization" = "1" Then
RScompanyResults__MM_UserAuthorization = "%"
Else If (Session("MM_UserAuthorization" <> "" Then
RScompanyResults__MM_UserAuthorization = Session("MM_UserAuthorization"
End If
End If
%>

Replies

Replied 07 Feb 2006 19:10:23
07 Feb 2006 19:10:23 Derek McLean replied:
make an extra boolean column for each level of security on your users table

use the show if recordset not empty thing in server behaviours

if admin = yes, for example then it will show the info in the area on your page
if admin = no, then you could display an error message
Replied 07 Feb 2006 19:13:59
07 Feb 2006 19:13:59 Derek McLean replied:
this seems to work better than the macromedia generated nonsense

ps make a recordset that will either return your user, or nothing if no admin, then use the server behaviour

Reply to this topic