fix: allow domain admin view shared dns zone records

This commit is contained in:
Qu Xuan
2020-09-29 11:19:49 +08:00
parent 341ad0c19f
commit d45d48806b
2 changed files with 20 additions and 0 deletions
+8
View File
@@ -387,6 +387,14 @@ func (manager *SDnsRecordSetManager) ResourceScope() rbacutils.TRbacScope {
return rbacutils.ScopeDomain
}
func (self *SDnsRecordSet) IsSharable(reqUsrId mcclient.IIdentityProvider) bool {
dnsZone, err := self.GetDnsZone()
if err != nil {
return false
}
return dnsZone.IsSharable(reqUsrId)
}
func (self *SDnsRecordSet) GetOwnerId() mcclient.IIdentityProvider {
dnsZone, err := self.GetDnsZone()
if err != nil {
+12
View File
@@ -131,6 +131,18 @@ var (
Action: PolicyActionList,
Result: rbacutils.Allow,
},
{
Service: api.SERVICE_TYPE,
Resource: "dns_recordsets",
Action: PolicyActionList,
Result: rbacutils.Allow,
},
{
Service: api.SERVICE_TYPE,
Resource: "dns_recodsets",
Action: PolicyActionGet,
Result: rbacutils.Allow,
},
},
},
{