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

Editor in Role table in Admin interface #942

Closed
jochenklar opened this issue Mar 15, 2024 · 5 comments · Fixed by #1014
Closed

Editor in Role table in Admin interface #942

jochenklar opened this issue Mar 15, 2024 · 5 comments · Fixed by #1014
Assignees
Labels
Milestone

Comments

@jochenklar
Copy link
Member

Description / Beschreibung

On /admin/accounts/role/ "all Sites" is shown for "EDITORS" even when the user is only editor of one site.

@jochenklar jochenklar added this to the RDMO 2.2.0 milestone Mar 15, 2024
@jochenklar
Copy link
Member Author

... it actually works as expected, @MyPyDavid do you have any idea why I filed this issue?

@jochenklar jochenklar self-assigned this Jun 3, 2024
@MyPyDavid
Copy link
Member

I just checked and I don't get the "all Sites" at all, just a list of each site..

In rdmo/accounts/admin.py , the getattr(obj, f'{field_name}__count', 0) counts 2x"all Sites" .
Should be fixed with adding distinct=True to the Count:

Count('member', distinct=True), Count('manager', distinct=True), Count('editor', distinct=True), Count('reviewer', distinct=True),

MyPyDavid added a commit that referenced this issue Jun 4, 2024
@jochenklar
Copy link
Member Author

Ah I just added the change to #1014.

@MyPyDavid
Copy link
Member

yeah, I saw #1014 only afterwards 🙈 , closed it.

@MyPyDavid MyPyDavid linked a pull request Jun 4, 2024 that will close this issue
@jochenklar
Copy link
Member Author

Will be released in RDMO 2.2.

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

Successfully merging a pull request may close this issue.

2 participants