Closed (fixed)
Project:
Group permissions
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2022 at 21:48 UTC
Updated:
27 Mar 2024 at 14:49 UTC
Jump to comment: Most recent
Comments
Comment #2
msnassar commentedThis will be easy to fix once Routes are using non existing global permission get merged
Comment #3
lobsterr commentedWe already had such request, it didn't a lot of demand from users and it was postponed. We can comeback to it again
Comment #4
lobsterr commentedComment #5
msnassar commentedI have added a draft MR. The MR won't work without first having https://www.drupal.org/project/group_permissions/issues/3360880 merge .So change to "Needs work" for now...
Comment #6
monaw commentedhi, i see this patch is for Group 1.x; is there something similar for Group 3.x?
Comment #8
msnassar commentedI also believe that:
1- we should generate the permissions (we have only one for now "override group permissions") through "permission_callbacks". By doing it this way we can guarantee that the permissions are generated only when the group type supports group permissions.
2- Apply a custom validation on the group permission that validates the group type supports group permission. This will guarantee that the modules (e.g. group permissions parameter, group permissions flex, ...) using the group permissions module as API to only create group permissions entities if the group type support it.
@LOBsTerr what do you think?
Comment #9
lobsterr commentedAlso there is a case, when we have already group permission and we decided to disable group permissions on the group type level.We don't handle this case here, we need to check
Comment #10
lobsterr commentedI have fixed everything and also merged #3360880: Routes are using non existing global permission
In order to use "permission_callbacks", please use this patch #3313220: permission_callbacks is not handled correctly. Unfortunately, Kristian doesn't want to support group 1 anymore :(
Comment #12
lobsterr commentedThank you for your contribution
Comment #13
msnassar commented@LOBsTerr Thanks for moving on with this issue. I looked quickly into the MR, I didn't see the application of
_group_permissions_enabledto anything? Am I missing something?Also as mentioned in #8 (point 2), I think we should applied custom validation on the group permission entity that prevent creating group permission entities in case the group permission is not enabled on the type of the group? This will be helpful for modules that uses group permission module as a api (We could do this in a follow up).
Comment #16
lobsterr commentedHi @msnassar,
1) After the merge _group_permissions_enabled requirement was removed, I brought it back.
2) I added entity validation as requested.
Please check 1.0.x dev branch all changes already pushed there, if everything is fine I will tag a new release.