Commit 08c9cb4c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Finally fix stuff related to dynamic config

parent 939c046a
module ApplicationSettingsHelper
def gravatar_enabled?
current_application_settings.gravatar_enabled?
end
def signup_enabled?
current_application_settings.signup_enabled
current_application_settings.signup_enabled?
end
def signin_enabled?
current_application_settings.signin_enabled
current_application_settings.signin_enabled?
end
def extra_sign_in_text
......
......@@ -14,6 +14,6 @@ module ProfileHelper
end
def show_profile_remove_tab?
gitlab_config.signup_enabled
signup_enabled?
end
end
......@@ -104,7 +104,7 @@
%p
Sign up
%span.light.pull-right
= boolean_to_icon gitlab_config.signup_enabled
= boolean_to_icon signup_enabled?
%p
LDAP
%span.light.pull-right
......@@ -112,7 +112,7 @@
%p
Gravatar
%span.light.pull-right
= boolean_to_icon Gitlab.config.gravatar.enabled
= boolean_to_icon gravatar_enabled?
%p
OmniAuth
%span.light.pull-right
......
......@@ -9,7 +9,7 @@ describe "Profile account page", feature: true do
describe "when signup is enabled" do
before do
Gitlab.config.gitlab.stub(:signup_enabled).and_return(true)
ApplicationSetting.any_instance.stub(signup_enabled?: true)
visit profile_account_path
end
......@@ -23,7 +23,7 @@ describe "Profile account page", feature: true do
describe "when signup is disabled" do
before do
Gitlab.config.gitlab.stub(:signup_enabled).and_return(false)
ApplicationSetting.any_instance.stub(signup_enabled?: false)
visit profile_account_path
end
......
......@@ -3,7 +3,7 @@ require 'spec_helper'
describe 'Users', feature: true do
describe "GET /users/sign_up" do
before do
Gitlab.config.gitlab.stub(:signup_enabled).and_return(true)
ApplicationSetting.any_instance.stub(signup_enabled?: true)
end
it "should create a new user account" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment