pontoon icon indicating copy to clipboard operation
pontoon copied to clipboard

project_managers group is not created by default

Open flodolo opened this issue 1 year ago • 5 comments

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

flodolo avatar Oct 19 '24 05:10 flodolo

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

mathjazz avatar Oct 19 '24 15:10 mathjazz

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.

flodolo avatar Oct 19 '24 15:10 flodolo

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

mathjazz avatar Oct 20 '24 22:10 mathjazz

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.

https://github.com/mozilla/pontoon/blob/c546a2133b923c84c762d867fd981f03c2f652dd/pontoon/administration/forms.py#L69-L71

flodolo avatar Oct 21 '24 04:10 flodolo

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.

mathjazz avatar Oct 21 '24 07:10 mathjazz