Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004

    Unanswered: Is there an easier way?

    I am trying to restrict access to certain asp pages on my intranet. This is how it is currently written. I grab the user and if it does not match any of the groups specified, access is denied. Here is the code. Is there an easier way to do this? Thanks for any help or suggestions.

    'Temporary Fix to allow only Agents to Use Employee Search form.

    Dim strParm3
    strParm3 = Request.ServerVariables("Remote_User")
    strParm4 = Mid(strParm3,8,15)
    Response.write strParm3
    If (strParm4 <> "RETAILERINTRA") and (strParm4 <> "retailerintra") and (strParm4 <> "SECURITYTOP") and (strParm4 <> "securitytop") and (strParm4 <> "SECAGENTS") and (strParm4 <> "secagents") then

    Response.write strParm3
    Response.write strParm4
    Response.write "You do not have access to this page. Please notify Security for access"


  2. #2
    Join Date
    Nov 2003
    Christchurch, New Zealand
    First option would be to replace your if with a case statement...

    Second option would be to build a indexed collection of some sort

    but if you want to do it in code that is a fairly simply way to do things...

Posting Permissions

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