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.
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.
The text was updated successfully, but these errors were encountered:
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 withhook_og_user_access_alter()
, even though event subscribers are superior. Switching to event subscribers is out of scope for this issue.The text was updated successfully, but these errors were encountered: