From 7aa55a0bee40b789509eeb2246e61d95a99af355 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 23 2017 14:59:13 +0000 Subject: [PATCH 1/2] Add support for the custom username in the SSH URL Fixes https://pagure.io/pagure/issue/2524 Signed-off-by: Pierre-Yves Chibon --- diff --git a/template/repo_info.html b/template/repo_info.html index 4f05c0f..77bd309 100644 --- a/template/repo_info.html +++ b/template/repo_info.html @@ -225,7 +225,7 @@ git push -u origin master
SSH
+ git_url_ssh }}{{ repo.fullname }}.git" readonly>
@@ -245,7 +245,7 @@ git push -u origin master
SSH
+ git_url_ssh }}docs/{{ repo.fullname }}.git" readonly>
{% endif %} @@ -265,7 +265,7 @@ git push -u origin master
SSH
+ git_url_ssh }}tickets/{{ repo.fullname }}.git" readonly>
{% endif %} @@ -274,7 +274,7 @@ git push -u origin master
SSH
+ git_url_ssh }}requests/{{ repo.fullname }}.git" readonly>
{% endif %} From 31142b1325d6948fd8ed9f19cb0ce82d26afbd5f Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 23 2017 14:59:13 +0000 Subject: [PATCH 2/2] Do not show the SSH url when the user is not logged in Signed-off-by: Pierre-Yves Chibon --- diff --git a/template/repo_info.html b/template/repo_info.html index 77bd309..e215e6d 100644 --- a/template/repo_info.html +++ b/template/repo_info.html @@ -221,6 +221,7 @@ git push -u origin master aria-expanded="false" aria-controls="moregiturls" id="more_gits">more{%endif%}
+ {% if authenticated and g.repo_committer %}
SSH
@@ -228,6 +229,7 @@ git push -u origin master git_url_ssh }}{{ repo.fullname }}.git" readonly>
+ {% endif %}
GIT