Skip to content

Commit

Permalink
backend/content-type: allow guest to fetch the entities of content-nodes
Browse files Browse the repository at this point in the history
In these content-types, the ACL is defined in the Module.php.
Adapt them according to 7ff466d.

Issue: ecamp#1415
  • Loading branch information
BacLuc committed Jun 6, 2021
1 parent 7cafc29 commit 81de17a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
9 changes: 8 additions & 1 deletion backend/content-type/eCampMultiSelect/src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ public function onBootstrap(MvcEvent $e): void {
Option::class,
[Acl::REST_PRIVILEGE_FETCH_ALL]
);

$acl->allow(
User::ROLE_USER,
Option::class,
[Acl::REST_PRIVILEGE_FETCH],
new UserIsCollaborator([CampCollaboration::ROLE_MEMBER, CampCollaboration::ROLE_MANAGER, CampCollaboration::ROLE_GUEST])
);

$acl->allow(
User::ROLE_USER,
Option::class,
[
Acl::REST_PRIVILEGE_CREATE,
Acl::REST_PRIVILEGE_FETCH,
Acl::REST_PRIVILEGE_PATCH,
Acl::REST_PRIVILEGE_UPDATE,
Acl::REST_PRIVILEGE_DELETE,
Expand Down
9 changes: 8 additions & 1 deletion backend/content-type/eCampSingleText/src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,19 @@ public function onBootstrap(MvcEvent $e): void {
SingleText::class,
[Acl::REST_PRIVILEGE_FETCH_ALL]
);

$acl->allow(
User::ROLE_USER,
SingleText::class,
[Acl::REST_PRIVILEGE_FETCH],
new UserIsCollaborator([CampCollaboration::ROLE_MEMBER, CampCollaboration::ROLE_MANAGER, CampCollaboration::ROLE_GUEST])
);

$acl->allow(
User::ROLE_USER,
SingleText::class,
[
Acl::REST_PRIVILEGE_CREATE,
Acl::REST_PRIVILEGE_FETCH,
Acl::REST_PRIVILEGE_PATCH,
Acl::REST_PRIVILEGE_UPDATE,
Acl::REST_PRIVILEGE_DELETE,
Expand Down
9 changes: 8 additions & 1 deletion backend/content-type/eCampStoryboard/src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ public function onBootstrap(MvcEvent $e): void {
Section::class,
[Acl::REST_PRIVILEGE_FETCH_ALL]
);

$acl->allow(
User::ROLE_USER,
Section::class,
[Acl::REST_PRIVILEGE_FETCH],
new UserIsCollaborator([CampCollaboration::ROLE_MEMBER, CampCollaboration::ROLE_MANAGER, CampCollaboration::ROLE_GUEST])
);

$acl->allow(
User::ROLE_USER,
Section::class,
[
Acl::REST_PRIVILEGE_CREATE,
Acl::REST_PRIVILEGE_FETCH,
Acl::REST_PRIVILEGE_PATCH,
Acl::REST_PRIVILEGE_UPDATE,
Acl::REST_PRIVILEGE_DELETE,
Expand Down

0 comments on commit 81de17a

Please sign in to comment.