Information About Current User

1. How to use @UserRoles to determine the roles the current user has ?
2. How to find out if the current user is a member of a specified group in the Public Name & Address Book ?

TIA for the answers.
steven_ng_canwelAsked:
Who is Participating?
 
itsimonchanCommented:
I'd suggest you to use @UserNamesList instead because it is a superset of @UserRoles such that it can be used for user roles and group members.
0
 
snocrossCommented:
I only have an answer for the first question and it may not be the best way but it works for me.

1) Create a computed field with the formula @Userroles

2) Sign on to Notes or web using the username of the person to check.  It should display all the roles that the current user has.
0
 
Simon_HendryCommented:
there are a number of ways to do both these things I think you need to specify where , why and how you want this information ( In script , In formula etc ???)

As snocross says you can simply use @UserRoles to see what roles a users has and to see if a user is a member of a group you could use something like

@IsMember(@UserName;@DbLookup("";"<SERVERNAME>":"names.nsf";"Groups";"<GROUPNAME>";"Members"));

Where <ServerName> is the server that has the Domino Directory(NAB) on it and <GROUPNAME> is the name of the group

0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
steven_ng_canwelAuthor Commented:
Thanks Simon. I ended up using the same method as per your suggestion below:

@IsMember(@UserName;@DbLookup("";"<SERVERNAME>":"names.nsf";"Groups";"<GROUPNAME>";"Members"));


Steven Ng
0
 
Simon_HendryCommented:
If this question  has been answered you should either allocate some points (*GRIN *) or remove it from the EE forum
0
 
DavidSiviourCommented:
Note there is also the hidden view in the names.nsf called "$ServerAccess"  this tells you all the groups a person is a member of.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.