diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/services/users/approve_service.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/services/users/approve_service.rb')
-rw-r--r-- | app/services/users/approve_service.rb | 8 |
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') |