UIHelpers Class
Item Index
Methods
- isInRole static
Methods
isInRole
(
Boolean
static
-
role
-
[scope]
UI helper to check if current user is in at least one of the target roles. For use in client-side templates.
Parameters:
-
role
StringName of role or comma-seperated list of roles.
-
[scope]
String optionalOptional, name of scope to check.
Returns:
Boolean:
true
if current user is in at least one of the target roles.
Example:
{{#if isInRole 'admin'}}
{{/if}}
{{#if isInRole 'editor,user'}}
{{/if}}
{{#if isInRole 'editor,user' 'scope1'}}
{{/if}}