Merge pull request #8149 from ioito/hotfix/qx-dns-record-list

fix: allow domain admin view shared dns zone records
This commit is contained in:
yunion-ci-robot
2020-09-29 12:23:34 +08:00
committed by GitHub
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,
},
},
},
{