summaryrefslogtreecommitdiffstats
path: root/services/convert/notification.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/convert/notification.go')
-rw-r--r--services/convert/notification.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/convert/notification.go b/services/convert/notification.go
index 5d3b078a25..3906fa9b38 100644
--- a/services/convert/notification.go
+++ b/services/convert/notification.go
@@ -9,6 +9,7 @@ import (
activities_model "code.gitea.io/gitea/models/activities"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/perm"
+ access_model "code.gitea.io/gitea/models/perm/access"
api "code.gitea.io/gitea/modules/structs"
)
@@ -24,7 +25,7 @@ func ToNotificationThread(n *activities_model.Notification) *api.NotificationThr
// since user only get notifications when he has access to use minimal access mode
if n.Repository != nil {
- result.Repository = ToRepo(db.DefaultContext, n.Repository, perm.AccessModeRead)
+ result.Repository = ToRepo(db.DefaultContext, n.Repository, access_model.Permission{AccessMode: perm.AccessModeRead})
// This permission is not correct and we should not be reporting it
for repository := result.Repository; repository != nil; repository = repository.Parent {