aboutsummaryrefslogtreecommitdiffstats
path: root/modules/notification/mail
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-03-01 01:47:30 +0100
committerGitHub <noreply@github.com>2021-03-01 01:47:30 +0100
commita4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8 (patch)
tree92edf61ff2447e067a676832844a129050b4ec0f /modules/notification/mail
parente0900310c4354311362ef69d15c302c215eaa2a2 (diff)
downloadgitea-a4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8.tar.gz
gitea-a4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8.zip
Repository transfer has to be confirmed, if user can not create repo for new owner (#14792)
* make repo as "pending transfer" if on transfer start doer has no right to create repo in new destination * if new pending transfer ocured, create UI & Mail notifications
Diffstat (limited to 'modules/notification/mail')
-rw-r--r--modules/notification/mail/mail.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/notification/mail/mail.go b/modules/notification/mail/mail.go
index f984ea7661..f7192f5a52 100644
--- a/modules/notification/mail/mail.go
+++ b/modules/notification/mail/mail.go
@@ -170,3 +170,9 @@ func (m *mailNotifier) NotifyNewRelease(rel *models.Release) {
mailer.MailNewRelease(rel)
}
+
+func (m *mailNotifier) NotifyRepoPendingTransfer(doer, newOwner *models.User, repo *models.Repository) {
+ if err := mailer.SendRepoTransferNotifyMail(doer, newOwner, repo); err != nil {
+ log.Error("NotifyRepoPendingTransfer: %v", err)
+ }
+}