This endpoint is restricted to Pagure admins. @pingou can you double check that I did that right?
I think this is not quite right, but I'm not sure exactly how it should be done. @pingou can hopefully provide details.
Instead of checking is_admin you need to check that the token being used has the regenerate_gitolite "acl" associated with their session. No such acl currently exists, so it will have to be added.
is_admin
regenerate_gitolite
Other acls that currently exist (and that you could grep for to see how it should work) are: create_project and modify_project.
create_project
modify_project
@ralph the decorator @api_login_required(acls=['generate_acls_project']) on the function checks the ACLs. I am just also checking that the user is a Pagure site admin because @pingou only wanted admins to be able to do this so that Pagure doesn't get DDOS'd.
@api_login_required(acls=['generate_acls_project'])
/me thinks
OK, I think we may need to remove the is_admin check otherwise @limb won't be able to trigger this check from the fedrepo-req-admin tool when processing new branches.
fedrepo-req-admin
rebased
@ralph okay, I removed the admin check. Now anyone who has a token with the proper ACL can do this on a project.
I guess this is no longer used
Let's change the default list of what users are allowed to do to remove this ACL then
You can drop the two lines following by simply using or {} at the end of this line :)
or {}
One important comment, one not the rest looks good, thanks! :)
@pingou I addressed your comments. Please review when you can.
I'll add a commit to your branch adjusting the doc for this
1 new commit added
Pull-Request has been merged by pingou
This endpoint is restricted to Pagure admins. @pingou can you double check that I did that right?