<?php
namespace CioBudget\Subscriber;
use CioCustomerPermissionGroups\Event\CustomerAclRolesEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class BudgetShiftPermissionSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [
CustomerAclRolesEvent::class => 'onCustomerAclRolesEvent',
];
}
public function onCustomerAclRolesEvent(CustomerAclRolesEvent $event)
{
$event->addRoles([
[
'title' => 'ALLOW_BUDGET_SHIFTS',
'description' => 'Das Übertragen von Guthaben aus eigenen Budget an beliebige andere Budgets erlauben.'
],
[
'title' => 'ALLOW_ADDING_USERS_TO_BUDGET',
'description' => 'Vertretern das Hinzufügen von Benutzern zum Budget erlauben.'
],
[
'title' => 'ALLOW_ACCESS_TO_BUDGET_HISTORY',
'description' => 'Einsicht in Budget-Historie im Frontend.'
],
[
'title' => 'ALLOW_SHOW_TOTAL_POINTS',
'description' => 'Einsicht der Gesamtpunkte im Frontend.'
]
]);
}
}