Funziona male... un utente con permesso D entra nella pagina INDEX con questi permessi:
codice:
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="A,B,C,D,E,AB,AC,AD,AE,BC,BD,BE,CD,CE,DE,ABC,ABD,ABE,ACD,ACE,ADE,BCE,BCD,BDE,CDE,ABCD,ABDE,ABCE,ACDE,BCDE,ABCDE"
MM_authFailedURL="login.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
if (false Or CStr(Session("MM_UserAuthorization"))="") Or _
InStr(1,MM_authorizedUsers,"," & Session("MM_UserAuthorization") & ",") <> 0 or _
InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization") & ",") = 2 or _
InStrRev(MM_authorizedUsers,"," & Session("MM_UserAuthorization")) = len(MM_authorizedUsers) - len(Session("MM_UserAuthorization")) then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
ma non nella pagina MAGAZZINO che è la pagina dove dovrebbe andare... con questi permessi...
codice:
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="D,AD,BD,CD,DE,ABD,ACD,ADE,BCD,BDE,CDE,ABCD,ABDE,ACDE,BCDE,ABCDE"
MM_authFailedURL="login.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
if (false Or CStr(Session("MM_UserAuthorization"))="") Or _
InStr(1,MM_authorizedUsers,"," & Session("MM_UserAuthorization") & ",") <> 0 or _
InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization") & ",") = 2 or _
InStrRev(MM_authorizedUsers,"," & Session("MM_UserAuthorization")) = len(MM_authorizedUsers) - len(Session("MM_UserAuthorization")) then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
a me sembrano uguali...