Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Provide a hook for altering access on group content entity operations #675

Closed
pfrenssen opened this issue Jul 30, 2020 · 0 comments · Fixed by #684
Closed

Provide a hook for altering access on group content entity operations #675

pfrenssen opened this issue Jul 30, 2020 · 0 comments · Fixed by #684

Comments

@pfrenssen
Copy link
Contributor

We have an alter hook in OgAccess::userAccess() that allows to alter user permission based access. In a similar vein we should allow to alter based on group content entity operations.

At the moment this is not impossible, since the group content entity operation access check also passes through ::userAccess(), but this puts the burden on the hook implementation to do the reverse mapping of the user permission (e.g. edit own article content) back to the operation (e.g. update) which can become difficult if group content exists for many different entity types.

I propose that for now we also introduce a hook_og_user_access_entity_operation_alter() hook so we are consistent with hook_og_user_access_alter(), even though event subscribers are superior. Switching to event subscribers is out of scope for this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant