diff options
| author | Mario de la Ossa <mdelaossa@gitlab.com> | 2018-02-02 18:39:55 +0000 |
|---|---|---|
| committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-02-02 18:39:55 +0000 |
| commit | eaada9d7066a20b5af815f723e09cde60a5c8c10 (patch) | |
| tree | 72ba4231e28f1c5e5405db21e0611a55e6428145 /app/services/users | |
| parent | 8fa2932dc5cc7687e7d85ae7b00c07fd9bcc24a4 (diff) | |
| download | gitlab-ce-eaada9d7066a20b5af815f723e09cde60a5c8c10.tar.gz | |
use Gitlab::UserSettings directly as a singleton instead of including/extending it
Diffstat (limited to 'app/services/users')
| -rw-r--r-- | app/services/users/build_service.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/services/users/build_service.rb b/app/services/users/build_service.rb index 61f1568f366..4fb6d221909 100644 --- a/app/services/users/build_service.rb +++ b/app/services/users/build_service.rb @@ -1,7 +1,5 @@ module Users class BuildService < BaseService - include Gitlab::CurrentSettings - def initialize(current_user, params = {}) @current_user = current_user @params = params.dup @@ -34,7 +32,7 @@ module Users private def can_create_user? - (current_user.nil? && current_application_settings.allow_signup?) || current_user&.admin? + (current_user.nil? && Gitlab::CurrentSettings.allow_signup?) || current_user&.admin? end # Allowed params for creating a user (admins only) @@ -102,7 +100,7 @@ module Users end def skip_user_confirmation_email_from_setting - !current_application_settings.send_user_confirmation_email + !Gitlab::CurrentSettings.send_user_confirmation_email end end end |
