hide issues from org private repos w/o team assignment (#4034)

This commit is contained in:
David Schneiderbauer authored and techknowlogick committed 2018-06-21 12:00:13 -04:00
1 parent 46d19c4676
commit 0b3ea42847
24 files changed
+545 -72

No files matched your search

+10
View File
@@ -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
}