Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
08c9cb4c
Commit
08c9cb4c
authored
Jan 08, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finally fix stuff related to dynamic config
parent
939c046a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
8 deletions
+12
-8
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+6
-2
app/helpers/profile_helper.rb
app/helpers/profile_helper.rb
+1
-1
app/views/admin/dashboard/index.html.haml
app/views/admin/dashboard/index.html.haml
+2
-2
spec/features/profile_spec.rb
spec/features/profile_spec.rb
+2
-2
spec/features/users_spec.rb
spec/features/users_spec.rb
+1
-1
No files found.
app/helpers/application_settings_helper.rb
View file @
08c9cb4c
module
ApplicationSettingsHelper
module
ApplicationSettingsHelper
def
gravatar_enabled?
current_application_settings
.
gravatar_enabled?
end
def
signup_enabled?
def
signup_enabled?
current_application_settings
.
signup_enabled
current_application_settings
.
signup_enabled
?
end
end
def
signin_enabled?
def
signin_enabled?
current_application_settings
.
signin_enabled
current_application_settings
.
signin_enabled
?
end
end
def
extra_sign_in_text
def
extra_sign_in_text
...
...
app/helpers/profile_helper.rb
View file @
08c9cb4c
...
@@ -14,6 +14,6 @@ module ProfileHelper
...
@@ -14,6 +14,6 @@ module ProfileHelper
end
end
def
show_profile_remove_tab?
def
show_profile_remove_tab?
gitlab_config
.
signup_enabled
signup_enabled?
end
end
end
end
app/views/admin/dashboard/index.html.haml
View file @
08c9cb4c
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
%p
%p
Sign up
Sign up
%span
.light.pull-right
%span
.light.pull-right
=
boolean_to_icon
gitlab_config
.
signup_enabled
=
boolean_to_icon
signup_enabled?
%p
%p
LDAP
LDAP
%span
.light.pull-right
%span
.light.pull-right
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
%p
%p
Gravatar
Gravatar
%span
.light.pull-right
%span
.light.pull-right
=
boolean_to_icon
Gitlab
.
config
.
gravatar
.
enabled
=
boolean_to_icon
gravatar_enabled?
%p
%p
OmniAuth
OmniAuth
%span
.light.pull-right
%span
.light.pull-right
...
...
spec/features/profile_spec.rb
View file @
08c9cb4c
...
@@ -9,7 +9,7 @@ describe "Profile account page", feature: true do
...
@@ -9,7 +9,7 @@ describe "Profile account page", feature: true do
describe
"when signup is enabled"
do
describe
"when signup is enabled"
do
before
do
before
do
Gitlab
.
config
.
gitlab
.
stub
(
:signup_enabled
).
and_return
(
true
)
ApplicationSetting
.
any_instance
.
stub
(
signup_enabled?:
true
)
visit
profile_account_path
visit
profile_account_path
end
end
...
@@ -23,7 +23,7 @@ describe "Profile account page", feature: true do
...
@@ -23,7 +23,7 @@ describe "Profile account page", feature: true do
describe
"when signup is disabled"
do
describe
"when signup is disabled"
do
before
do
before
do
Gitlab
.
config
.
gitlab
.
stub
(
:signup_enabled
).
and_return
(
false
)
ApplicationSetting
.
any_instance
.
stub
(
signup_enabled?:
false
)
visit
profile_account_path
visit
profile_account_path
end
end
...
...
spec/features/users_spec.rb
View file @
08c9cb4c
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
describe
'Users'
,
feature:
true
do
describe
'Users'
,
feature:
true
do
describe
"GET /users/sign_up"
do
describe
"GET /users/sign_up"
do
before
do
before
do
Gitlab
.
config
.
gitlab
.
stub
(
:signup_enabled
).
and_return
(
true
)
ApplicationSetting
.
any_instance
.
stub
(
signup_enabled?:
true
)
end
end
it
"should create a new user account"
do
it
"should create a new user account"
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