diff --git a/modules/convert/notification.go b/modules/convert/notification.go index f304eadf6..1efba5745 100644 --- a/modules/convert/notification.go +++ b/modules/convert/notification.go @@ -25,6 +25,11 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread { // since user only get notifications when he has access to use minimal access mode if n.Repository != nil { result.Repository = ToRepo(n.Repository, perm.AccessModeRead) + + // This permission is not correct and we should not be reporting it + for repository := result.Repository; repository != nil; repository = repository.Parent { + repository.Permissions = nil + } } // handle Subject