[dist-git] Fix for api call token
There is a local fix on src.fedoraproject.org that is missing on src.stg.fedoraproject.org. I provided the fix in https://pagure.io/pagure/pull-request/5525 and this commit is adding it as patch to ansible, so the change is permanent.
This commit is contained in:
parent
a0046b5b4b
commit
5b0120cea9
2 changed files with 21 additions and 0 deletions
12
roles/distgit/pagure/files/api_project.patch
Normal file
12
roles/distgit/pagure/files/api_project.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/pagure/api/project.py b/pagure/api/project.py
|
||||
index 80e0f22..02991fd 100644
|
||||
--- a/pagure/api/project.py
|
||||
+++ b/pagure/api/project.py
|
||||
@@ -1449,6 +1449,7 @@ def api_new_project():
|
||||
|
||||
if (
|
||||
pagure_config["PAGURE_AUTH"] == "oidc"
|
||||
+ and hasattr(flask.g.fas_user, "can_create")
|
||||
and flask.g.fas_user.can_create is False
|
||||
):
|
||||
raise pagure.exceptions.APIError(
|
|
@ -55,6 +55,15 @@
|
|||
tags:
|
||||
- pagure
|
||||
|
||||
# https://pagure.io/pagure/pull-request/5525
|
||||
- name: Fix the API call with token
|
||||
ansible.posix.patch:
|
||||
src: files/api_project.patch
|
||||
dest: /usr/lib/python3.6/site-packages/pagure/api/project.py
|
||||
tags:
|
||||
- pagure
|
||||
- hotfix
|
||||
|
||||
- name: Create the "git" user
|
||||
ansible.builtin.command:
|
||||
cmd: useradd --create-home --home-dir=/srv/git/ git
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue