mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
beginning of ACL added
This commit is contained in:
parent
18025012a8
commit
38a26f0bc1
@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Menu;
|
||||
|
||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Knp\Menu\MenuItem;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
@ -64,13 +65,15 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
|
||||
]);
|
||||
}
|
||||
|
||||
$menu->addChild($this->translator->trans('Accompanying courses of users'), [
|
||||
'route' => 'chill_course_list_reassign',
|
||||
])
|
||||
->setExtras([
|
||||
'order' => 12,
|
||||
'icons' => ['task'],
|
||||
]);
|
||||
// if ($this->authorizationChecker->isGranted(AccompanyingPeriodVoter::REASSIGN_BULK, null)) {
|
||||
$menu->addChild($this->translator->trans('Accompanying courses of users'), [
|
||||
'route' => 'chill_course_list_reassign',
|
||||
])
|
||||
->setExtras([
|
||||
'order' => 12,
|
||||
'icons' => ['task'],
|
||||
]);
|
||||
// }
|
||||
}
|
||||
|
||||
public static function getMenuIds(): array
|
||||
|
@ -34,6 +34,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
self::FULL,
|
||||
self::TOGGLE_CONFIDENTIAL_ALL,
|
||||
self::TOGGLE_INTENSITY,
|
||||
self::REASSIGN_BULK
|
||||
self::RE_OPEN_COURSE,
|
||||
];
|
||||
|
||||
@ -87,6 +88,8 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
*/
|
||||
public const TOGGLE_INTENSITY = 'CHILL_PERSON_ACCOMPANYING_PERIOD_TOGGLE_INTENSITY';
|
||||
|
||||
public const REASSIGN_BULK ='CHILL_PERSON_ACCOMPANYING_COURSE_REASSIGN_BULK';
|
||||
|
||||
private Security $security;
|
||||
|
||||
private VoterHelperInterface $voterHelper;
|
||||
|
Loading…
x
Reference in New Issue
Block a user