HasPermissions
trait HasPermissions (View source)
Methods
This method should be clean of checks, the checks should happen earlier on.
Add global permission to item, after making sure the permission is valid
Revoke global permission from the item, after making sure the permission is valid
Add module permission to item, after making sure the permission is valid
Revoke module permission from the item, after making sure the permission is valid
Revoke all module permissions from the item
Add module item permission, after making sure the permission is valid
Revoke module item permissions, after making sure the permission is valid
Revoke all module item permissions
Revoke all permissions
Revoke all permissions from a list of permission ids
Check if a permission is available for a particular scope
Details
BelongsToMany
permissions()
This method should be clean of checks, the checks should happen earlier on.
void
grantGlobalPermission(string $name)
Add global permission to item, after making sure the permission is valid
void
revokeGlobalPermission(string $name)
Revoke global permission from the item, after making sure the permission is valid
void
grantModulePermission(string $name, string|object $permissionableType)
Add module permission to item, after making sure the permission is valid
void
revokeModulePermission(string $name, string|object $permissionableType)
Revoke module permission from the item, after making sure the permission is valid
void
revokeAllModulePermission(string|object $permissionableType)
Revoke all module permissions from the item
void
grantModuleItemPermission(string $name, object $permissionableItem)
Add module item permission, after making sure the permission is valid
void
revokeModuleItemPermission(string $name, object $permissionableItem)
Revoke module item permissions, after making sure the permission is valid
void
revokeModuleItemAllPermissions(object $permissionableItem)
Revoke all module item permissions
void
revokeAllPermissions()
Revoke all permissions
void
removePermissions(int[] $permissionableIds)
Revoke all permissions from a list of permission ids
protected void
checkPermissionAvailable(string $name, string $scope)
Check if a permission is available for a particular scope