sjpptq
Last Updated: February 25, 2016
·
332
· jairyg

Determine if a User Belongs to an Allegro Security Group

There is a method on the UI side for Class Events that allows you to determine if a user belongs to one of many groups. The method is IsMember(). Its signature is below:

public bool IsMember(params string[] group)

For example, you could determine if the caller is a member of the "NG Traders" group using the following call:

if (IsMember("NG Traders")) 
{ 
    //code here 
}

Adding more than one security group to the parameter causes the method to check if the user is in any one of the groups that was submitted. If the user is in none of the groups, it will return false.

This works in all UI side Class Events.