Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting a group doesn't update members' accounts #2258

Open
Peter-H-Etteplan opened this issue Mar 21, 2022 · 0 comments
Open

Deleting a group doesn't update members' accounts #2258

Peter-H-Etteplan opened this issue Mar 21, 2022 · 0 comments

Comments

@Peter-H-Etteplan
Copy link

Peter-H-Etteplan commented Mar 21, 2022

If you have a group, say "VIP", with a few members and you delete the group, the members' account YAML files will still contain

groups:
 - VIP

This means that if you have custom code that reads group membership directly from the YAML files, you have to also read the /user/config/groups.yaml file to check if the group actually exists and is enabled. Also, if you create a group and assign it certain permissions, not knowing that a group with the same name previously existed, you may unknowingly have some group members that are not supposed to have those permissions.

Shouldn't deleting a group also delete the group from all group members?

I have checked the behavior in Grav 1.7.31 and Admin Panel 1.10.31 and see no related PRs or issues.

Edit: I didn't think about the case when a group is disabled but not deleted. Then it doesn't make much sense removing the group from all members, since you'd have to resubscribe them all after enabling the group again. Having users that are members of a disabled group is at least conceptually more pleasing than them being members of a group that doesn't exists, but poses the same practical issues (forcing you to inspect the groups.yaml file when evaluating group membership).

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

No branches or pull requests

1 participant