mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-07-31 13:20:11 +02:00
Add tests for read access to user's roles via 'Auth' interface
This commit is contained in:
@@ -325,6 +325,19 @@ function showDebugData(\Delight\Auth\Auth $auth, $result) {
|
||||
echo ' / ';
|
||||
var_dump($auth->getStatus());
|
||||
|
||||
echo "\n";
|
||||
|
||||
echo 'Roles (super moderator)'."\t\t\t";
|
||||
var_dump($auth->hasRole(\Delight\Auth\Role::SUPER_MODERATOR));
|
||||
|
||||
echo 'Roles (developer *or* manager)'."\t\t";
|
||||
var_dump($auth->hasAnyRole(\Delight\Auth\Role::DEVELOPER, \Delight\Auth\Role::MANAGER));
|
||||
|
||||
echo 'Roles (developer *and* manager)'."\t\t";
|
||||
var_dump($auth->hasAllRoles(\Delight\Auth\Role::DEVELOPER, \Delight\Auth\Role::MANAGER));
|
||||
|
||||
echo "\n";
|
||||
|
||||
echo '$auth->isRemembered()'."\t\t\t";
|
||||
var_dump($auth->isRemembered());
|
||||
echo '$auth->getIpAddress()'."\t\t\t";
|
||||
|
Reference in New Issue
Block a user