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

Archived group memberships not visible on user admin page #4

Closed
jefft opened this issue Feb 4, 2015 · 4 comments
Closed

Archived group memberships not visible on user admin page #4

jefft opened this issue Feb 4, 2015 · 4 comments

Comments

@jefft
Copy link
Contributor

jefft commented Feb 4, 2015

Hi,

Say I have a group, called 'Test Group', and then restrict a user to that group via Admin -> User Accounts:

screenshot

If I then Archive the group, the admin view for our use changes to this:

screenshot

Instead of seeing the archived group's name, we see an empty field.

This gives the impression that there are NO group-level restrictions on the user, i.e. that the user can see all groups. But actually the user can see no groups - they're limited to just one (archived) group. Super confusing!

Finally, if one clicks 'Update Account' on a user with an archived group, the archived group membership is lost:

screenshot

By doing so, one may have inadvertently given a user access to all groups.

@tbar0970
Copy link
Owner

tbar0970 commented Feb 6, 2015

Thanks for the clear bug report. It's also possible the restriction group could be deleted.

What do you think would be the best fix? One option would be to not allow groups to be archived/deleted if they are in use for user account restrictions. Another would be to somehow leave the account as "restricted to nothing" if the only allowed group is deleted.

@tbar0970 tbar0970 added the bug label Feb 6, 2015
@jefft
Copy link
Contributor Author

jefft commented Feb 6, 2015

Hi Tom,

I think group archiving should be a reversible operation. If I archive a group, think "oops" and unarchive it, that shouldn't trash all the group visibility restrictions.

And certainly, if I'm restricted to group A, and then group A is deleted/archived, I should now be able to see nothing, not everything (as would happen if the restriction is just deleted).

So perhaps keep recording the fact that a user is restricted to an archived group, and treat it as if they have no access.

@tbar0970
Copy link
Owner

Yep.
If they are restricted to one group, and that group is deleted, we will need to have some way of marking them as "restricted to nothing"!
Will work on it.

@tbar0970
Copy link
Owner

tbar0970 commented Jun 2, 2023

Curent behaviour:

  • If group X is used in user restrictions, attempts to delete that group fail with a message "you can't deelte this because it's in use for a user restriction". Good.
  • But if I ARCHIVE a group that's used for restrictions, then when I go to edit the user account, it's not in the list, so they look like they have no restrictions, and if I save the form they WILL have no restrictions.

To fix: Make sure the current-restriction group(s) is included in the selection list even if archived.

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

No branches or pull requests

2 participants