21 lines
630 B
PHP
Executable file
21 lines
630 B
PHP
Executable file
<?php
|
|
|
|
namespace pedodev\tagging\event;
|
|
|
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|
|
|
class permissions implements EventSubscriberInterface
|
|
{
|
|
static public function getSubscribedEvents(): array
|
|
{
|
|
return [
|
|
'core.permissions' => 'load_permissions',
|
|
];
|
|
}
|
|
|
|
public function load_permissions(object $event): void
|
|
{
|
|
$event->update_subarray('permissions', 'u_pedodev_tagging_cantagposts', ['lang' => 'ACL_U_PEDODEV_TAGGING_CANTAGPOSTS', 'cat' => 'post']);
|
|
$event->update_subarray('permissions', 'u_pedodev_tagging_cantagsearch', ['lang' => 'ACL_U_PEDODEV_TAGGING_CANTAGSEARCH', 'cat' => 'misc']);
|
|
}
|
|
}
|