From e300795f42ddc67f719871c2b8008c2b7caba979 Mon Sep 17 00:00:00 2001 From: rainzm Date: Mon, 27 Sep 2021 18:24:20 +0800 Subject: [PATCH] fix(notify): allow list and get topics for all --- pkg/notify/policy/defaults.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkg/notify/policy/defaults.go b/pkg/notify/policy/defaults.go index e7b990dcca..e2d4bb0fa8 100644 --- a/pkg/notify/policy/defaults.go +++ b/pkg/notify/policy/defaults.go @@ -73,6 +73,24 @@ var ( }, }, }, + { + Auth: true, + Scope: rbacutils.ScopeSystem, + Rules: []rbacutils.SRbacRule{ + { + Service: api.SERVICE_TYPE, + Resource: "topics", + Action: PolicyActionGet, + Result: rbacutils.Allow, + }, + { + Service: api.SERVICE_TYPE, + Resource: "topics", + Action: PolicyActionList, + Result: rbacutils.Allow, + }, + }, + }, } )