Commit 07b2a099 authored by Julien Fastré's avatar Julien Fastré
Browse files

allow hierarchy in roles

parent cf823ef4
......@@ -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() ];
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment