diff --git a/pagure/templates/requests.html b/pagure/templates/requests.html
index 8898169..fb96fc0 100644
--- a/pagure/templates/requests.html
+++ b/pagure/templates/requests.html
@@ -243,7 +243,7 @@ $(function() {
});
});
-{% if authenticated and repo_admin %}
+{% if authenticated and g.repo_admin %}
$(function() {
$.ajax({
url: '{{ url_for("internal_ns.get_pull_request_ready_branch") }}' ,