IsCurrentUserInRoles Method
Syntax
Context.Security.IsCurrentUserInRoles as L (RoleNames as C)
Arguments
- RoleNamesCharacter
The name of the roles. Multiple role names must be specified as a CRLF delimited list.
Returns
- resultLogical
Returns .T. if the current user is in at least one of the specified roles; otherwise .F.
Description
Checks to see if the current user is in at least one of supplied roles.
Discussion
Context.Security.IsCurrentUserInRole() checks to see if the current user is in at least one of supplied roles. Check Context.Security.CallResult.Success before using the return value.
Example
dim roles as c =<<%txt% Administrators Users %txt% dim authorized as L = .f. if (context.security.isCurrentUserInRoles(roles)) then authorized = .t. end if