[thelist] [Theforum] extract NT security (groups) through .asp / javascript
Rich Gray
richardgray at onetel.co.uk
Thu Aug 1 12:03:01 CDT 2002
James,
Have you tried with the NT Domain name specified in the ADSI GetObject call?
i.e. GetObject("WinNT://" & NTDOMAIN & "/" & strUser)
HTH
Rich
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Caravan, James C
REV:EX (by way of Madhu Menon <webguru at vsnl.net>)
Sent: 01 August 2002 17:06
To: thelist at lists.evolt.org
Subject: [thelist] [Theforum] extract NT security (groups) through .asp
/ javascript
I am specifically looking for extracting NT permission groups and found this
bit of code.
in Global.asa:
Sub Session_OnStart
'**Put your code here **
on error resume next
strUsername=Replace(ucase(Request.ServerVariables("LOGON_USER")) ,
"\",
"/")
set adsUser = getobject("WinNT://" & strUsername)
for each group in adsUser.groups
GrpList = GrpList & lcase(trim(group.name)) & ";"
session("GroupList") = session("GroupList") &
lcase(trim(group.name)) & ";"
next
if instr(1, GrpList ,"SecureNTGroupName") then session("permission")
=
"OK"
End sub
-----------------------
In code.asp:
<%
response.write "Group List " & session("GroupList")
if session("permission") <> "OK" then Response.Redirect
"loginfailure.asp"
%>
---------------------------
Unfortunately there is nothing being written out for GroupList so I can
see
the NT security groups being extracted.
Do you have any thought? maybe code that should work?
Thanks
> James Caravan
> Programmer/Analyst
> RevISB
> Ministry of Provincial Revenue
> 2nd Floor, 1802 Douglas Street
> Victoria, British Columbia V8T 4K6
>
> phone 250 356-1568
> fax 250 356-0361
>
> MailTo:James.Caravan at gems4.gov.bc.ca
> James Caravan
> Programmer/Analyst
> RevISB
> Ministry of Provincial Revenue
> 2nd Floor, 1802 Douglas Street
> Victoria, British Columbia V8T 4K6
>
> phone 250 356-1568
> fax 250 356-0361
>
> MailTo:James.Caravan at gems4.gov.bc.ca
>
>
---
evolt.org wiki: http://freezope2.nipltd.net/acorn/evolt/
-
How can you help?
http://freezope2.nipltd.net/acorn/evolt/FactFindingMission
--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list