You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.
Currently we only have full entity operation access checks for group content (see for example OgEventSubscriber::provideDefaultNodePermissions() which supplies these for node group content).
We have a group permission called update group but this is not currently enforced and (edit: is enforced now, ref. #673) test coverage for this is incomplete (ref. a user with this permission (user4) is created in OgEntityAccessTest but the test doesn't actually check that this user has edit access and other users don't.
We are also lacking a delete group permission. I think a create group permission is not needed, since this is controlled by Drupal permissions (a newly created group doesn't have any members yet so we cannot control this using an OG permission). We are ignoring view permissions too.
In order to fulfill this I propose:
Create a new GroupPermission to delete groups, apply it to the group admin by default, and treat it in the same way as the UPDATE_GROUP_PERMISSION.
Extend the tests, not only on the return value of the access checks like is being done in OgEntityAccessTest but also in scenarios where groups are actually being updated and deleted, i.e. through hook_entity_access().
The text was updated successfully, but these errors were encountered:
pfrenssen
changed the title
Provide entity operation access checks on group entities
Provide "deleteentity operation access checks on group entities
Aug 2, 2020
pfrenssen
changed the title
Provide "deleteentity operation access checks on group entities
Provide "delete" entity operation access checks on group entities
Aug 2, 2020
Currently we only have full entity operation access checks for group content (see for example
OgEventSubscriber::provideDefaultNodePermissions()
which supplies these for node group content).We have a group permission called
update group
butthis is not currently enforced and(edit: is enforced now, ref. #673) test coverage for this is incomplete (ref. a user with this permission (user4
) is created inOgEntityAccessTest
but the test doesn't actually check that this user has edit access and other users don't.We are also lacking a
delete group
permission. I think acreate group
permission is not needed, since this is controlled by Drupal permissions (a newly created group doesn't have any members yet so we cannot control this using an OG permission). We are ignoring view permissions too.In order to fulfill this I propose:
GroupPermission
to delete groups, apply it to the group admin by default, and treat it in the same way as theUPDATE_GROUP_PERMISSION
.OgEntityAccessTest
but also in scenarios where groups are actually being updated and deleted, i.e. throughhook_entity_access()
.The text was updated successfully, but these errors were encountered: