From b72ea4c197aecd0cfe9d2c15483523ea3505194c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 29 2017 08:50:17 +0000 Subject: Actually, only let pagure admin or the main admin give a project We do not want just any admin to transfer the main admin responsability it'll have to be either an instance wide admin or the main admin of the project. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/settings.html b/pagure/templates/settings.html index 478c173..2f28a29 100644 --- a/pagure/templates/settings.html +++ b/pagure/templates/settings.html @@ -1061,7 +1061,7 @@ {% endif %} {% if config.get('ENABLE_GIVE_PROJECTS', True) - and (repo.user.user == g.fas_user.username or g.repo_admin) + and (repo.user.user == g.fas_user.username or pagure_admin) and not repo.is_fork %}
diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index a217ce0..3108d23 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -1067,6 +1067,7 @@ def view_settings(repo, username=None, namespace=None): tags=tags, plugins=plugins, branchname=branchname, + pagure_admin=pagure.is_admin() )