summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorAndrew Smith <espadav8@gmail.com>2016-11-30 22:26:22 +1000
committerAndrew Smith <espadav8@gmail.com>2016-12-01 22:13:42 +1000
commit532f8cbd38d61ba73886ea3ed0dbce1864819bec (patch)
tree1b99addfbfa9722ee3ea13b1543d1fffc97c9927 /app/models/user.rb
parent42dc2033dd4f04203c6f025ee96a058e050c9312 (diff)
downloadgitlab-ce-532f8cbd38d61ba73886ea3ed0dbce1864819bec.tar.gz
If SSH prototol is disabled don't say the user requires SSH keys
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index b54ce14f0bf..b9bb4a9e3f7 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -512,7 +512,7 @@ class User < ActiveRecord::Base
end
def require_ssh_key?
- keys.count == 0
+ keys.count == 0 && Gitlab::ProtocolAccess.allowed?('ssh')
end
def require_password?