Link to home
Start Free TrialLog in
Avatar of cyle
cyle

asked on

Using lotus script for User Roles.

I need to validate if the user, based on user roles but I need to use lotus script. Thanks!
Avatar of CRAK
CRAK
Flag of Netherlands image

Use "Evaluate" to see what @Userroles (or @Implode(@Userroles)) returns....
Perhaps not the fastest, but certainly the easiest way!
Avatar of p_partha
p_partha

From the help:

Dim session As New NotesSession
Dim db As NotesDatabase
Dim acl As NotesACL
Dim entry As NotesACLEntry
Set db = session.CurrentDatabase
Set acl = db.ACL
Set entry = acl.GetEntry( "Bob Kidder" )
Forall r In entry.Roles
  Messagebox( r )
End Forall
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Evaluate("@UserRoles") actually works better, because the other two methods can be used against named ACL entries.  If the user is in a role as part of a group, they will fail.  @UserRoles never fails that way.  Forewarned: Occasionaly, Evaluate of @UserRoles doesn't pick up changes correctly.