Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-06-2005, 03:30 PM   PM User | #1
omaits
New to the CF scene

 
Join Date: Nov 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
omaits is an unknown quantity at this point
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!
omaits is offline   Reply With Quote
Old 01-06-2005, 06:16 PM   PM User | #2
omaits
New to the CF scene

 
Join Date: Nov 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
omaits is an unknown quantity at this point
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
omaits is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:19 AM.


Advertisement
Log in to turn off these ads.