mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
[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:
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
|
||||
|
||||
Reference in New Issue
Block a user