$Domain.HasPermission
Overview
Returns true or false value that user has permission on specified profile and permissions.
boolean $Domain.HasPermission(identity: any, profile: string, permissions: number)
Arguments
any identity
identity to check
string profile
id or name of security profile
number permissions
permission to check
Returns
Returns true if user has permission, otherwise false.
Remarks
Permissions are bitwise values. You can use bitwise operators to combine permissions.
By default Read (1), Execute (16), Write (256), Delete (4096), All (65535) permissions are defined.
Example
var user = $Membership.FindIdentity('elton.john');
let hasPermission = $Domain.HasPermission(user, 'Default', 1);
Copyright © 2010 - 2023 Emakin. All rights reserved.