Constructs a new instance of UserPermissions with optional initial data.
Optional
data: UserPermissionFlagsAn object containing the initial permissions.
Grants the specified permissions.
The permissions to grant.
The updated UserPermissions instance.
Denies the specified permissions.
The permissions to deny.
The updated UserPermissions instance.
Checks if this instance is equal to another UserPermissions instance.
The other instance to compare.
true
if both instances are equal, otherwise false
.
Checks if the specified permission is granted.
The permission to check.
true
if the permission is granted, otherwise false
.
Converts the permissions to a plain object representation.
An object with permissions and their status.
Static
is
Represents a set of user permissions and provides methods to manage them.