Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IFmember for asp 2

Status
Not open for further replies.

HebieBug

Programmer
Jan 8, 2001
354
JP
Does anyone know if I can find out if a user is a member of a specified group.
Problem:
Company wants to put on OWA restrictions to only allow certain persons to access mail. Can't use F/S permissions as OWA will not work.
Proposed solution:
In logon.asp was going to put a line of code to the effect of := If member of OWA access group then run rest of page else redirect them to the "you don't have access to this page screen"
Anyone know how I can find out if they are a member of the group?
 
I did before something in VBScript that could help :
Code:
function isLoggedUserFromGroup(Parm_GroupName)

  isLoggedUserFromGroup = false
  Set WshShell		= CreateObject("Wscript.Shell")
  Set WshEnvironnement= WshShell.Environment("PROCESS")
  Set WshNetwork      = CreateObject("WScript.Network")
  Set G_User = GetObject("WinNT://" & WshEnvironnement("USERDOMAIN")& "/" & WshNetwork.UserName)

  For Each Group In G_User.Groups
    if Group.name = Parm_GroupName then
      isLoggedUserFromGroup = true
      exit for
    end if
  next

end function
Water is not bad as long as it stays out human body ;-)
 
On method you could use it to install CDO on your web server, then in asp, or better yet a VB dll, access the Exchange Server directly to check the needed access.

I did a Google search on VB CDO and found many sites with information on programming with CDO. I also like I have found good code regarding CDO there.

Thanks,

Gabe
 
Awsome dudes.
I like the quote about water in the body. Have just changed from coke to red fanta to make sure the blood stays it's redest
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top