Test a permission
Definition at line 14 of file PermissionTester.php.
◆ evaluate()
BristolSU\Support\Permissions\Contracts\PermissionTester::evaluate |
( |
string |
$ability | ) |
|
◆ evaluateFor()
BristolSU\Support\Permissions\Contracts\PermissionTester::evaluateFor |
( |
string |
$ability, |
|
|
?User |
$userModel, |
|
|
?Group |
$group, |
|
|
?Role |
$role |
|
) |
| |
Test if the given set of credentials have a given ability
- Parameters
-
string | $ability | Ability of the permission |
User | null | $userModel | User to test the permission against |
Group | null | $group | Group to test the permission against |
Role | null | $role | Role to test the permission against |
- Returns
- bool Do the given credentials have the permission?
◆ register()
BristolSU\Support\Permissions\Contracts\PermissionTester::register |
( |
Tester |
$tester | ) |
|
Register a new permission tester
- Parameters
-
Tester | $tester | Implementation of the permission tester |
- Returns
- void
The documentation for this interface was generated from the following file: