fix: allow all users to read system notification templates (#14181)

This commit is contained in:
Danny Kopping
2024-08-06 15:37:49 +02:00
committed by GitHub
parent 70a694ed4c
commit 58428aafce
3 changed files with 48 additions and 7 deletions

View File

@ -2610,8 +2610,10 @@ func (s *MethodTestSuite) TestNotifications() {
}))
s.Run("GetNotificationTemplatesByKind", s.Subtest(func(db database.Store, check *expects) {
check.Args(database.NotificationTemplateKindSystem).
Asserts(rbac.ResourceNotificationTemplate, policy.ActionRead).
Asserts().
Errors(dbmem.ErrUnimplemented)
// TODO(dannyk): add support for other database.NotificationTemplateKind types once implemented.
}))
s.Run("UpdateNotificationTemplateMethodByID", s.Subtest(func(db database.Store, check *expects) {
check.Args(database.UpdateNotificationTemplateMethodByIDParams{