Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/users/approve_service.rb')
-rw-r--r--app/services/users/approve_service.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/users/approve_service.rb b/app/services/users/approve_service.rb
index 228cfbd6947..27668e9430e 100644
--- a/app/services/users/approve_service.rb
+++ b/app/services/users/approve_service.rb
@@ -15,7 +15,9 @@ module Users
# Please see Devise's implementation of `resend_confirmation_instructions` for detail.
user.resend_confirmation_instructions
user.accept_pending_invitations! if user.active_for_authentication?
+ DeviseMailer.user_admin_approval(user).deliver_later
+ after_approve_hook(user)
success
else
error(user.errors.full_messages.uniq.join('. '))
@@ -26,6 +28,10 @@ module Users
attr_reader :current_user
+ def after_approve_hook(user)
+ # overridden by EE module
+ end
+
def allowed?
can?(current_user, :approve_user)
end
@@ -35,3 +41,5 @@ module Users
end
end
end
+
+Users::ApproveService.prepend_if_ee('EE::Users::ApproveService')