From 715dcce4859496a1c8cc47cdb70992d07e8ae918 Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Wed, 1 Sep 2021 11:16:50 +0800 Subject: [PATCH] fix(region): access group policy --- pkg/compute/models/access_group_caches.go | 4 ++++ pkg/compute/policy/resources.go | 3 +++ 2 files changed, 7 insertions(+) diff --git a/pkg/compute/models/access_group_caches.go b/pkg/compute/models/access_group_caches.go index bd5dc5a61f..0c5860f1dd 100644 --- a/pkg/compute/models/access_group_caches.go +++ b/pkg/compute/models/access_group_caches.go @@ -70,6 +70,10 @@ type SAccessGroupCache struct { NetworkType string `width:"8" charset:"ascii" nullable:"false" index:"true" list:"user" default:"vpc"` } +func (manager *SAccessGroupCacheManager) ResourceScope() rbacutils.TRbacScope { + return rbacutils.ScopeDomain +} + func (manager *SAccessGroupCacheManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool { return false } diff --git a/pkg/compute/policy/resources.go b/pkg/compute/policy/resources.go index a7bc01e21d..92f8af2095 100644 --- a/pkg/compute/policy/resources.go +++ b/pkg/compute/policy/resources.go @@ -55,6 +55,9 @@ var ( "natgateways", "natsentries", "natdentries", + "file_systems", + "access_groups", + "access_group_caches", "policy_assignments", "proxysettings", "project_mappings",