Currently on PyPI, we have two types of users:
User.is_superuser is true)User.is_staff but I believe it's unused).It'd be great to add an intermediate level of user, "Moderator", which has the ability to do the following:
/admin views (but read-only)The "Moderator" user should not be able to:
(cc @99)
The User.is_staff field comes from when I was attempting to port Warehouse to Django, and I do believe it is entirely unused.
One thing that might also be useful (although could come at a later time too!) is the ability to do things like request a delete of a project (or a nuke of a user etc), and then have the admins be able to deny or approve that request. That allows them to structurally make recommendations to the admins, and the admins to still have the final say. It also allows us to provide a path towards moderators becoming admins (if they desire) since we can easily look and go "hey, every time this person makes a recommendation we end up following up, maybe we just want to promote them".
Agreed. I think the steps to address this, roughly broken up by PRs, would be:
User model, as well as corresponding UI in /admin for administrators to toggle this flag for users;/admin POST endpoints, as well as conditionals in the HTML templates to hide actions that are not enabled for moderators, and to make fields not appear editable;Yea, that seems like a great path forward.
I am going to start working on this. I have the first part complete (add new field and migration as well as adding is_moderator as settable in admin UIs) https://github.com/pypa/warehouse/pull/5249/files
@di @dstufft I am moving on to Add ACLs for various /admin POST endpoints, as well as conditionals in the HTML templates to hide actions that are not enabled for moderators, and to make fields not appear editable;
Do you have a starting list of activities you would like to allow moderators to do? For instance, should moderators be able to mark other users as having a verified email?
@crwilcox See the issue body:
view all the existing /admin views (but read-only)
set upload limits
add classifiers
@jamadden @yeraydiazdiaz Would you like to be moderators?
That鈥檚 a yes for me, thanks 鈽猴笍
@theacodes volunteered if you want additional moderators.
I volunteer too, if you need more eyes and hands on deck. :)
Yes, please. And thank you.
@ewdurbin I got your Slack invite, thank you. Would it be possible to switch it to the alternate address for my PyPI account?
absolutely. will do.
Hey, we have moderators now! Closing this.