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

project_managers group is not created by default #3417

Open
flodolo opened this issue Oct 19, 2024 · 5 comments
Open

project_managers group is not created by default #3417

flodolo opened this issue Oct 19, 2024 · 5 comments
Labels
P4 We expect it to be fixed someday task

Comments

@flodolo
Copy link
Collaborator

flodolo commented Oct 19, 2024

This feels like a bug, since the group is then used to set up point of contact in projects?

@mathjazz
Copy link
Collaborator

Should we just show all users with access to /admin in the Project Manager list and drop references to the project_managers group?

@mathjazz mathjazz moved this from 🆕 Needs triage to 📋 Not ready yet in Pontoon Roadmap Oct 19, 2024
@mathjazz mathjazz added task P4 We expect it to be fixed someday labels Oct 19, 2024
@flodolo
Copy link
Collaborator Author

flodolo commented Oct 19, 2024

Should we just show all users with access to /admin in the Project Manager list and drop references to the project_managers group?

I think the original intent was to have 2 separate groups: PMs can manage projects, but can't access the Django interface. Is that accurate?

We should probably check what's the current overlap between the two groups.

@mathjazz
Copy link
Collaborator

Pardon, my question was wrong. We actually already show all users with access to /admin in the Project Manager list.

There's not that much overlap with the staff users (who can access the Django interface), so apparently it makes sense to keep these two lists separate:
https://pontoon.mozilla.org/a/auth/user/?is_staff__exact=1

@flodolo
Copy link
Collaborator Author

flodolo commented Oct 21, 2024

Pardon, my question was wrong. We actually already show all users with access to /admin in the Project Manager list.

Can you clarify what you mean with "show"? If you mean within the project admin UI, that doesn't match my experience on a local install: I had to manually create the group and add myself (an admin), that's why I filed the issue.

self.fields["contact"].queryset = User.objects.filter(
groups__name="project_managers"
).order_by("email")

@mathjazz
Copy link
Collaborator

The can_manage_project permission is required to access the /admin page. It's assigned to members of the project_managers group, which are shown in the Project Manager list in the Project Admin page. So the same permission is controlling both, access to /admin and appearance in the Project Manager list.

Your experience on the fresh install makes sense - you had to create the group due to this bug (we should fix that with a data migration) and you were able to access /admin, because you created your user with a createsuperuser command, which means you had all permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 We expect it to be fixed someday task
Projects
Status: 📋 Not ready yet
Development

No branches or pull requests

2 participants