UserRolePolicy
Table of Contents
Methods
-
checkPermission()
: mixed
-
hasAllPermission()
: mixed
-
hasAnyPermission()
: mixed
-
hasRole()
: bool
checkPermission()
public
checkPermission(User|null $user, string $permission) : mixed
Parameters
-
$user
: User|null
-
-
$permission
: string
-
hasAllPermission()
public
hasAllPermission(User|null $user, array<string|int, mixed> $permissions) : mixed
Parameters
-
$user
: User|null
-
-
$permissions
: array<string|int, mixed>
-
hasAnyPermission()
public
hasAnyPermission(User|null $user, array<string|int, mixed> $permissions) : mixed
Parameters
-
$user
: User|null
-
-
$permissions
: array<string|int, mixed>
-
hasRole()
public
hasRole(string $role) : bool
Parameters
-
$role
: string
-