0
0
Fork 0
mirror of https://github.com/verdigado/organization_folders.git synced 2024-12-06 11:22:41 +01:00

added OrganizationFolder security voter; improved Resource security voter

This commit is contained in:
Jonathan Treffler 2024-11-18 18:04:40 +01:00
parent f062b2dd41
commit b64ae41cd0
6 changed files with 177 additions and 39 deletions

View file

@ -17,6 +17,7 @@ use OCA\OrganizationFolders\Listener\SabrePluginAddListener;
use OCA\OrganizationFolders\Listener\LoadAdditionalScripts;
use OCA\OrganizationFolders\Security\AuthorizationService;
use OCA\OrganizationFolders\Security\ResourceVoter;
use OCA\OrganizationFolders\Security\OrganizationFolderVoter;
class Application extends App implements IBootstrap {
public const APP_ID = 'organization_folders';
@ -31,6 +32,7 @@ class Application extends App implements IBootstrap {
$context->registerService(AuthorizationService::class, function (ContainerInterface $c) {
$service = new AuthorizationService($c->get(IUserSession::class));
$service->registerVoter($c->get(OrganizationFolderVoter::class));
$service->registerVoter($c->get(ResourceVoter::class));
return $service;
});