custom/plugins/CioSubaccounts/src/Subscriber/SubaccountsPermissions.php line 17

Open in your IDE?
  1. <?php
  2. namespace CioSubaccounts\Subscriber;
  3. use CioCustomerPermissionGroups\Event\CustomerAclRolesEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class SubaccountsPermissions implements EventSubscriberInterface
  6. {
  7.     public static function getSubscribedEvents()
  8.     {
  9.         return [
  10.             CustomerAclRolesEvent::class => 'onCustomerAclRolesEvent',
  11.         ];
  12.     }
  13.     public function onCustomerAclRolesEvent(CustomerAclRolesEvent $event)
  14.     {
  15.         $event->addRoles([
  16.             [
  17.                 'title' => 'ALLOW_MANAGE_SUBACCOUNTS',
  18.                 'description' => 'Erlaubt die Verwaltung von eigenen Subaccounts.'
  19.             ]
  20.         ]);
  21.     }
  22. }