This topic is locked
[SOLVED]

 integrate asprunner security in larger website

9/18/2004 4:25:12 AM
ASPRunnerPro General questions
E
ekopelowitz author

Hi Sergei, I would like to use asprunnerpro pages in a larger website that already has its own login /security system. What I need is to maitain the security levels of asprunner, ie. that user can only see information associated with his or her records. Which are the lines of codes that must be in the login and security code of each .asp page in order for the asprunner permissions to function? Thank you, Ezra

Sergey Kornilov admin 9/20/2004

Ezra,
here is what you need to to copy-and-paste to use ASPRunner's security:

  1. Login.asp
    make sure that after successfull login following variables are filled:
    Session("UserID") = Request("username")

    Session("AccessLevel") = ACCESS_LEVEL_USER

    Session("OwnerID") = rs("##USERSOWNERID##")


2. ..._list.asp, other ASP pages
To protect ASP pages from unauthorized access:

<%

If Session("UserID")="" Then

Response.Redirect "login.asp"

End If

%>


3. ..._list.asp

Function CheckSecurity(strValue, strAction)

...

End Function


4. ..._list.asp

To protect functions like Add, Edit and Delete you need to call CheckSecurity function passing OwnerID value and action ("Add", "Edit" or "Delete" as parameters). This function returns True if this acction is allowed and False in other case.
I hope it helps a little bit.