mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
@@ -21,13 +21,14 @@ namespace Chill\ActivityBundle\Security\Authorization;
|
||||
|
||||
use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\MainBundle\Security\ProvideRoleInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||
*/
|
||||
class ActivityVoter extends AbstractChillVoter
|
||||
class ActivityVoter extends AbstractChillVoter implements ProvideRoleInterface
|
||||
{
|
||||
const CREATE = 'CHILL_ACTIVITY_CREATE';
|
||||
const SEE = 'CHILL_ACTIVITY_SEE';
|
||||
@@ -63,4 +64,15 @@ class ActivityVoter extends AbstractChillVoter
|
||||
|
||||
return $this->helper->userHasAccess($user, $report, $attribute);
|
||||
}
|
||||
|
||||
public function getRoles()
|
||||
{
|
||||
return $this->getSupportedAttributes();
|
||||
}
|
||||
|
||||
public function getRolesWithoutScope()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user