• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

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.
0
steven_ng_canwel
Asked:
steven_ng_canwel
1 Solution
 
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
 
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now