allow checking of multiple permissions at once

This commit is contained in:
Gert
2015-05-11 16:35:23 +02:00
parent 25263f783d
commit d92cb462ea

View File

@@ -165,7 +165,14 @@ class Admin
*/
public function authorise($action = 'admin.login')
{
return $this->user->authorise($action);
$action = (array) $action;
foreach ($action as $a) {
if ($this->user->authorise($a))
return true;
}
return false;
}
/**