app/library/Services.php: get role from authed user getType() method.
This commit is contained in:
parent
ca27834a56
commit
89e096c4fd
1 changed files with 2 additions and 1 deletions
|
|
@ -289,7 +289,8 @@ class Services extends DiDefault
|
||||||
$menu = new Menu($navigation);
|
$menu = new Menu($navigation);
|
||||||
$menu->setMenuClass(null);
|
$menu->setMenuClass(null);
|
||||||
if ($this->get('auth')->hasIdentity()) {
|
if ($this->get('auth')->hasIdentity()) {
|
||||||
$menu->setAclRole(Acl::ROLE_USER);
|
$type = $this->get('auth')->getIdentity()->getType();
|
||||||
|
$menu->setAclRole($type);
|
||||||
} else {
|
} else {
|
||||||
$menu->setAclRole(Acl::ROLE_GUEST);
|
$menu->setAclRole(Acl::ROLE_GUEST);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue