add ACTIVITY_SEE_DETAILS role

This new role allow to see the details (remark + reasons) in the timeline.
This commit is contained in:
2017-06-20 15:17:51 +02:00
parent f7c9e6f3b8
commit 239ea38e92
4 changed files with 30 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ namespace Chill\ActivityBundle\Security\Authorization;
use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\MainBundle\Security\ProvideRoleInterface;
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
use Chill\MainBundle\Entity\Center;
/**
@@ -29,7 +29,7 @@ use Chill\MainBundle\Entity\Center;
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
*/
class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleInterface
class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
{
const STATS = 'CHILL_ACTIVITY_STATS';
const LISTS = 'CHILL_ACTIVITY_LIST';
@@ -74,4 +74,8 @@ class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleInterf
return $this->getSupportedAttributes();
}
public function getRolesWithHierarchy()
{
return [ 'Activity' => $this->getRoles() ];
}
}