Skip to content
This repository was archived by the owner on May 12, 2018. It is now read-only.

Commit 71e62cb

Browse files
committed
Merge branch 'allowed-urls'
Signed-off-by: Dmitriy Zaporozhets <[email protected]> Conflicts: config/application.yml.example spec/support/stub_gitlab_calls.rb
2 parents d203d14 + 88c01f1 commit 71e62cb

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

app/models/user_session.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def authenticate_by_token(auth_opts)
2424
def authenticate_via(options, &block)
2525
url = options.delete(:url)
2626

27-
return nil unless GitlabCi.config.allowed_gitlab_urls.include?(url)
27+
return nil unless GitlabCi.config.gitlab_server_urls.include?(url)
2828

2929
user = block.call(url, Network.new, options)
3030

app/views/user_sessions/_form.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
%div
1313
= f.label :url, 'GitLab Server'
1414
%div
15-
= f.select :url, GitlabCi.config.allowed_gitlab_urls.map {|url| [url, url] }, { placeholder: 'http://gitlab.company.com' }, class: 'form-control signin-select'
15+
= f.select :url, GitlabCi.config.gitlab_server_urls.map {|url| [url, url] }, { placeholder: 'http://gitlab.company.com' }, class: 'form-control signin-select'
1616
%br
1717
= f.submit "Sign in", class: 'btn btn-lg btn-success btn-block'

config/application.yml.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
defaults: &defaults
2-
allowed_gitlab_urls:
2+
gitlab_server_urls:
33
# Replace with your gitlab server url
44
- 'https://gitlab.example.com/'
55

@@ -36,7 +36,7 @@ development:
3636

3737
test:
3838
<<: *defaults
39-
allowed_gitlab_urls:
39+
gitlab_server_urls:
4040
- 'http://demo.gitlab.com/'
4141

4242
production:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
development:
2-
allowed_gitlab_urls:
2+
gitlab_server_urls:
33
- 'http://localhost:3000'
44
gitlab_ci:
55
host: localhost
6-
port: 5000
6+
port: 9000
77
https: false

spec/requests/projects_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
describe API::API do
44
include ApiHelpers
55

6-
let(:gitlab_url) { GitlabCi.config.allowed_gitlab_urls.first }
6+
let(:gitlab_url) { GitlabCi.config.gitlab_server_urls.first }
77
let(:auth_opts) {
88
{
99
:email => "[email protected]",

spec/requests/runners_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
describe "GET /runners" do
12-
let(:gitlab_url) { GitlabCi.config.allowed_gitlab_urls.first }
12+
let(:gitlab_url) { GitlabCi.config.gitlab_server_urls.first }
1313
let(:auth_opts) {
1414
{
1515
:email => "[email protected]",

spec/support/stub_gitlab_calls.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def stub_js_gitlab_calls
1414
private
1515

1616
def gitlab_url
17-
GitlabCi.config.allowed_gitlab_urls.first
17+
GitlabCi.config.gitlab_server_urls.first
1818
end
1919

2020
def stub_session

0 commit comments

Comments
 (0)