Enables scripted content fragments to check Permissions
Methods
HasPermission
HasPermission Overload 1
Checks a permission for the accessing user
Velocity
#set($booleanResponse = $core_v2_userPermission.HasPermission($permissionId, $contentId, $contentTypeId))
JavaScript
var booleanResponse = core_v2_userPermission.HasPermission(permissionId, contentId, contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
permissionId | Guid | Permission Id | Required | ||
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
HasPermission Overload 2
Checks a site permission for the accessing user
Velocity
#set($booleanResponse = $core_v2_userPermission.HasPermission($permissionId))
JavaScript
var booleanResponse = core_v2_userPermission.HasPermission(permissionId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
permissionId | Guid | Permission Id | Required |
Returns
Boolean