mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-31 01:35:56 +08:00
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:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user