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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-26 00:11:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-26 00:11:07 +0300
commit1c61faf876f0da721dde9dc52fb28ab0e7330c6d (patch)
treeb2c5330325d7cc53098dbcf53de1186f5b54bfba /app/services/notification_service.rb
parenteccc2ec564f427460be5ffa6f9a6fb25f3f7fe6d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index f1781b3d3c5..b0de62c299a 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -88,6 +88,20 @@ class NotificationService
end
end
+ # Notify the owner of the account when a new application is created
+ def application_created(user)
+ return unless user.can?(:receive_notifications)
+
+ mailer.application_created_email(user).deliver_now
+ end
+
+ # Notify the owner of the account when an application is authorized
+ def application_authorized(user)
+ return unless user.can?(:receive_notifications)
+
+ mailer.application_authorized_email(user).deliver_now
+ end
+
# Notify the owner of the account when a new personal access token is created
def access_token_created(user, token_name)
return unless user.can?(:receive_notifications)