Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    does "login as" really exist?

    I am trying to make a page that will allow users to login to a company intranet that contains sensetive memos and documents. The system will contain multiple 'tiers' of access including, but no limited to, finance, HR, accounting, ect...

    There will be one login for each department, but each department may have access to more than one section. I.E., accounting will be able to access accounting, finance, and operations. To tackle this, I have a field in the DB that has a letter to represent the sections they can access. The users will carry this value with them by way of a session variable and access whatever page they want, as long as they have permission.

    However, people could just 'guess' the location of sensetive documents. To solve this, I was hoping to be able to log in the user onto the server at each page. That way, if they guess the location of a document, they will be greeted with a login. This account will have the same permission as the IUser account. For example, if the user has permission to enter operations, when they go to operations.asp, they will be logged onto the server as 'Operations.'

    I heard of a 'login as user' function but haven't been able to find it and am not really sure how to search for it. Could someone help me out a bit? I would really appreciate any help you could lend. Also, if there are any problems with the technique I outlined above, could you let me know?

    Hopefully that is enough information...
    Thanks!

  • #2
    New to the CF scene
    Join Date
    Nov 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Found it! Here is an example of the logonuser script.

    Hopefully I can make it work now

    Dim Server, User
    Set Server = CreateObject("UserManager.Server")
    Server.LogonUser "Administrator", ""

    'Create a new user
    Set User = Server.Users.Add("NewUser", "UserPassword")

    'Add the new user to the group
    User.AddToLocalGroup "Guests"

    'Logon new user
    Server.LogonUser "NewUser", "UserPassword"

    'Some other operations under new user account
    Server.RevertToSelf


  •  

    Posting Permissions

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