diff options
Diffstat (limited to 'app/services/users/registrations_build_service.rb')
-rw-r--r-- | app/services/users/registrations_build_service.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/services/users/registrations_build_service.rb b/app/services/users/registrations_build_service.rb new file mode 100644 index 00000000000..9d7bf0a7e18 --- /dev/null +++ b/app/services/users/registrations_build_service.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Users + class RegistrationsBuildService < BuildService + extend ::Gitlab::Utils::Override + + private + + override :allow_caller_to_request_skip_confirmation? + def allow_caller_to_request_skip_confirmation? + true + end + + override :assign_skip_confirmation_from_settings? + def assign_skip_confirmation_from_settings?(user_params) + user_params[:skip_confirmation].blank? + end + end +end |