BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
532f8cbd
Commit
532f8cbd
authored
Nov 30, 2016
by
Andrew Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If SSH prototol is disabled don't say the user requires SSH keys
parent
42dc2033
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
user.rb
app/models/user.rb
+1
-1
24921-hide-prompt-to-add-ssh-key-if-ssh-protocol-is-disabled.yml
...ide-prompt-to-add-ssh-key-if-ssh-protocol-is-disabled.yml
+4
-0
user_spec.rb
spec/models/user_spec.rb
+12
-0
No files found.
app/models/user.rb
View file @
532f8cbd
...
...
@@ -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?
...
...
changelogs/unreleased/24921-hide-prompt-to-add-ssh-key-if-ssh-protocol-is-disabled.yml
0 → 100644
View file @
532f8cbd
---
title
:
Don't display prompt to add SSH keys if SSH protocol is disabled
merge_request
:
7840
author
:
Andrew Smith (EspadaV8)
spec/models/user_spec.rb
View file @
532f8cbd
...
...
@@ -575,6 +575,18 @@ describe User, models: true do
end
end
end
context
'when current_application_settings.enabled_git_access_protocol does not contain SSH'
do
before
do
stub_application_setting
(
enabled_git_access_protocol:
'HTTP'
)
end
it
"doesn't require user to have SSH key"
do
user
=
build
(
:user
)
expect
(
user
.
require_ssh_key?
).
to
be_falsey
end
end
end
describe
'.find_by_any_email'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment