#2388 Allow project-less API token to create new tickets
Merged by pingou. Opened by pingou.
new_issue_no_project  into  master

Download 2388.patch

This allows users to create projet-less API token to create new tickets
on any project, just like what they can do in the UI.

Fixes https://pagure.io/pagure/issue/2250

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

For PEP-8, the json import should be grouped with the other stdlib imports above.

LGTM!

@pingou don't you need to add to CROSS_PROJECT_ACLS?

Otherwise, when create an API key you only get these options:

Create a new project
 Fork a project
 Modify an existing project

You do, but I do not think this will be on by default, though it is already ready for dist-git: https://infrastructure.fedoraproject.org/cgit/ansible.git/commit/?id=550fc33df677606f7f2edfbcabe37f331641f6fc

Fair, I'll fix this :)

You do, but I do not think this will be on by default, though it is already ready for dist-git: https://infrastructure.fedoraproject.org/cgit/ansible.git/commit/?id=550fc33df677606f7f2edfbcabe37f331641f6fc

Ugh, @mprahl what I said only makes sense if the repo is hosted on src.fp.o which I guess won't be the case, right?
If that's true (that it's not in src.fp.o) then it's pagure.io's config file we'll need to update, for dist-git's pagure.

@pingou why not just put it in the default config? It seems fairly harmless to have on by default.

I kinda feel it would make it easier for potential spammer, so in a way I would prefer enabling this to be a concious admin decision.
It would also affect running pagure instances.

I may be able to be talked into it though.

rebased

Since this has been approved by @bowlofeggs I am going to merge it.

@mprahl if you feel we should enable it by default, let's discuss this in a ticket or a different PR :)

Thanks for your reviews! :)

Pull-Request has been merged by pingou

Metadata