allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/3] allura git commit: Fix for scm-ssh-key to be visible only if allow upload ssh key is true
Date Tue, 19 Jul 2016 19:19:10 GMT
Repository: allura
Updated Branches:
  refs/heads/master da52a2ca0 -> dd2a0d8ef


Fix for scm-ssh-key to be visible only if allow upload ssh key is true


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/cf4770b2
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/cf4770b2
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/cf4770b2

Branch: refs/heads/master
Commit: cf4770b2ce609e3a988335500459cb4f041b8769
Parents: da52a2c
Author: Rohan Verma <rohanverma2004@gmail.com>
Authored: Tue Jul 19 02:31:55 2016 +0530
Committer: Rohan Verma <rohanverma2004@gmail.com>
Committed: Tue Jul 19 02:34:27 2016 +0530

----------------------------------------------------------------------
 Allura/development.ini                     | 5 ++++-
 ForgeGit/forgegit/templates/git/index.html | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/cf4770b2/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 89566a7..79949bd 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -176,7 +176,6 @@ auth.allow_user_registration = true
 auth.allow_user_to_disable_account = true
 auth.allow_edit_prefs = true
 auth.allow_password_change = true
-auth.allow_upload_ssh_key = false
 auth.allow_user_messages_config = true
 auth.allow_birth_date = true
 auth.allow_non_primary_email_password_reset = true
@@ -184,6 +183,10 @@ auth.require_email_addr = true
 ; List of social network options to use on user account settings
 socialnetworks = Facebook, Linkedin, Twitter, Google+
 
+; Allow uploading ssh key, optionally set auth preferences url
+auth.allow_upload_ssh_key = false
+auth.preferences_url = /auth/preferences/
+
 ; In seconds
 auth.recovery_hash_expiry_period = 600
 

http://git-wip-us.apache.org/repos/asf/allura/blob/cf4770b2/ForgeGit/forgegit/templates/git/index.html
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/templates/git/index.html b/ForgeGit/forgegit/templates/git/index.html
index 400f016..4d6fd15 100644
--- a/ForgeGit/forgegit/templates/git/index.html
+++ b/ForgeGit/forgegit/templates/git/index.html
@@ -76,7 +76,8 @@ git push -u origin master</pre>
     &nbsp;
     <div class="message info scm-ssh-key">
       <div class="content">
-      Did you get asked for your {{config.site_name}} password during this process? You can
securely use your Git repository and avoid having to re-enter your password by <a href="https://{{config.domain}}/account/ssh">setting
up an ssh-key</a>.
+       {% if h.asbool(config.get('auth.allow_upload_ssh_key', True)) %} Did you get asked
for your {{config.site_name}} password during this process? You can securely use your Git
repository and avoid having to re-enter your password by <a href="{{config.get('auth.preferences_url')}}">setting
up an ssh-key</a>.
+       {% else %} Did you get asked for your {{config.site_name}} password during this process?
You can securely use your Git repository and avoid having to re-enter your password by asking
your server admin to enable uploading ssh keys</a>. {% endif %}
       </div>
     </div>
     {% else %}


Mime
View raw message