mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 22:04:23 +00:00
allow hierarchy in roles
This commit is contained in:
parent
cf823ef45b
commit
07b2a0994d
@ -21,14 +21,14 @@ namespace Chill\ReportBundle\Security\Authorization;
|
||||
|
||||
use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\MainBundle\Security\ProvideRoleInterface;
|
||||
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||
*/
|
||||
class ReportVoter extends AbstractChillVoter implements ProvideRoleInterface
|
||||
class ReportVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
|
||||
{
|
||||
const CREATE = 'CHILL_REPORT_CREATE';
|
||||
const SEE = 'CHILL_REPORT_SEE';
|
||||
@ -74,5 +74,9 @@ class ReportVoter extends AbstractChillVoter implements ProvideRoleInterface
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
public function getRolesWithHierarchy()
|
||||
{
|
||||
return [ 'Report' => $this->getRoles() ];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user