From 068e0f0e5eccdb2fbcd27deca8c2a05344b5810f Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 07 2016 10:50:18 +0000 Subject: Rely on flask.g.repo_admin in the templates since we set it in @repo_method --- diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html index 9ab7e36..35863c9 100644 --- a/pagure/templates/repo_info.html +++ b/pagure/templates/repo_info.html @@ -9,7 +9,7 @@
- {% if repo_admin and branch != head %} + {% if g.repo_admin and branch != head %}
SSH
@@ -177,7 +177,7 @@ git push -u origin master
{% endif %} - {% if authenticated and repo_admin %} + {% if authenticated and g.repo_admin %} {% if config.get('ENABLE_TICKETS', True) and repo.settings.get('issue_tracker', True) %}
Issues GIT URLs
@@ -266,7 +266,7 @@ $(function() { } }); - {% if authenticated and repo_admin %} + {% if authenticated and g.repo_admin %} $.ajax({ url: '{{ url_for("internal_ns.get_pull_request_ready_branch") }}' , type: 'POST', diff --git a/pagure/templates/repo_master.html b/pagure/templates/repo_master.html index de13543..2007267 100644 --- a/pagure/templates/repo_master.html +++ b/pagure/templates/repo_master.html @@ -156,7 +156,7 @@ Issues  - {{ repo.open_tickets if repo_admin else repo.open_tickets_public }} + {{ repo.open_tickets if g.repo_admin else repo.open_tickets_public }} @@ -195,7 +195,7 @@ {% endif %} {% if authenticated %} - {% if repo_admin %} + {% if g.repo_admin %}