mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
6ec1878977
commit
1aa42bdaf6
@ -6,6 +6,7 @@ namespace Icinga;
|
|||||||
use DateTimeZone;
|
use DateTimeZone;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use Icinga\Application\Config;
|
use Icinga\Application\Config;
|
||||||
|
use Icinga\Authentication\Role;
|
||||||
use Icinga\User\Preferences;
|
use Icinga\User\Preferences;
|
||||||
use Icinga\Web\Navigation\Navigation;
|
use Icinga\Web\Navigation\Navigation;
|
||||||
|
|
||||||
@ -238,6 +239,29 @@ class User
|
|||||||
$this->restrictions = $restrictions;
|
$this->restrictions = $restrictions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the roles of the user
|
||||||
|
*
|
||||||
|
* @return Role[]
|
||||||
|
*/
|
||||||
|
public function getRoles()
|
||||||
|
{
|
||||||
|
return $this->roles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the roles of the user
|
||||||
|
*
|
||||||
|
* @param Role[] $roles
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setRoles(array $roles)
|
||||||
|
{
|
||||||
|
$this->roles = $roles;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for username
|
* Getter for username
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user