The only way in script to check the roles of a user in the IsRoleEnabled function from NotesAclEntry - class. But this function don't work, when the user is member of a group and the the role is enabled for the group.
I have create a function which checks, whether a role is set for a User even if he is a member of a group.
Example how the function is calling:
If RoleEnabled("[Admin]") Then Messagebox "Role Admin is set" Else Messagebox "Role Admin not set" End If
Function RoleEnabled(sRole As String) As Integer Dim vResult As Variant vResult = Evaluate(|@IsMember("| & sRole & |"; @UserRoles)|) If vResult(0) = 1 Then RoleEnabled = 1 Else RoleEnabled = 0 End If 'If vResult(0) = 1 End Function