summaryrefslogtreecommitdiffstats
path: root/models/notification.go
diff options
context:
space:
mode:
authorDavid Schneiderbauer <daviian@users.noreply.github.com>2018-06-21 18:00:13 +0200
committertechknowlogick <techknowlogick@users.noreply.github.com>2018-06-21 12:00:13 -0400
commit0b3ea428477b9da33f40252e79aafe85b09526f3 (patch)
tree4fccc7dbf7f027331735d7d041bc290db632b744 /models/notification.go
parent46d19c4676efe5201c5de790bcb963bfc93a95c7 (diff)
downloadgitea-0b3ea428477b9da33f40252e79aafe85b09526f3.tar.gz
gitea-0b3ea428477b9da33f40252e79aafe85b09526f3.zip
hide issues from org private repos w/o team assignment (#4034)
Diffstat (limited to 'models/notification.go')
-rw-r--r--models/notification.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/models/notification.go b/models/notification.go
index c8376a857b..8c36c0c5c9 100644
--- a/models/notification.go
+++ b/models/notification.go
@@ -119,7 +119,17 @@ func createOrUpdateIssueNotifications(e Engine, issue *Issue, notificationAuthor
}
}
+ issue.loadRepo(e)
+
for _, watch := range watches {
+ issue.Repo.Units = nil
+ if issue.IsPull && !issue.Repo.CheckUnitUser(watch.UserID, false, UnitTypePullRequests) {
+ continue
+ }
+ if !issue.IsPull && !issue.Repo.CheckUnitUser(watch.UserID, false, UnitTypeIssues) {
+ continue
+ }
+
if err := notifyUser(watch.UserID); err != nil {
return err
}