mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix role hierarchy
This commit is contained in:
parent
f792d02e43
commit
faf5b7ca94
@ -80,7 +80,6 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
|
||||
'role_hierarchy' => array(
|
||||
ActivityVoter::UPDATE => array(ActivityVoter::SEE),
|
||||
ActivityVoter::CREATE => array(ActivityVoter::SEE),
|
||||
ActivityVoter::SEE => array(ActivityStatsVoter::STATS),
|
||||
ActivityVoter::DELETE => array(ActivityVoter::SEE)
|
||||
)
|
||||
));
|
||||
|
@ -22,7 +22,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\ActivityBundle\Security\Authorization\ActivityVoter;
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -47,12 +47,12 @@ class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleInterf
|
||||
|
||||
protected function getSupportedAttributes()
|
||||
{
|
||||
return array(self::STATS, ActivityVoter::SEE, self::LISTS);
|
||||
return array(self::STATS, self::LISTS);
|
||||
}
|
||||
|
||||
protected function getSupportedClasses()
|
||||
{
|
||||
return array('Chill\MainBundle\Entity\Center');
|
||||
return array(Center::class);
|
||||
}
|
||||
|
||||
protected function isGranted($attribute, $object, $user = null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user