From 6a3f43dd1fc33367f9ab2a2dca8f941591374374 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 01 2021 12:25:21 +0000 Subject: Add support for noggin with the FAS auth backend The particularity of this backend is to require that users sign the Fedora Project Contributor Agreement. With the new Auth system in Fedora, the contributors who have signed this agreement are in a dedicated group while it was separated before. That does mean that pagure needs to ask for the members of this group upon login, otherwise it has no way to know if the user is a member of that group (ie, if the user signed the agreement). This commit fixes that. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/flask_app.py b/pagure/flask_app.py index bece3ca..fca49cb 100644 --- a/pagure/flask_app.py +++ b/pagure/flask_app.py @@ -490,6 +490,8 @@ def auth_login(): # pragma: no cover ) ] groups = set(groups).union(admins) + if auth == "fas": + groups.add("signed_fpca") ext_committer = set(pagure_config.get("EXTERNAL_COMMITTER", {})) groups = set(groups).union(ext_committer) flask.g.unsafe_javascript = True