From 3d9bc5b4949129cf7ac37929461fb7d7a73364d2 Mon Sep 17 00:00:00 2001 From: Michal Konecny Date: Wed, 30 Apr 2025 15:09:25 +0200 Subject: [PATCH] [distgit] Fix the patch The patch provided originally was made against the latest pagure code, but we are not on the latest dev version. So I created the patch directly for the source file deployed on src.stg.fedoraproject.org. --- roles/distgit/pagure/files/api_project.patch | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/roles/distgit/pagure/files/api_project.patch b/roles/distgit/pagure/files/api_project.patch index 8eb3e04f4a..25911bb0e1 100644 --- a/roles/distgit/pagure/files/api_project.patch +++ b/roles/distgit/pagure/files/api_project.patch @@ -1,12 +1,5 @@ -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( +1455,1456c1455 +< +< if pagure_config["PAGURE_AUTH"] == 'oidc' and flask.g.fas_user.can_create is False: +--- +> if pagure_config["PAGURE_AUTH"] == 'oidc' and hasattr(flask.g.fas_user, "can_create") and flask.g.fas_user.can_create is False: