fix: no need to specify query scope when get with parameters

This commit is contained in:
Qiu Jian
2019-06-16 15:03:58 +08:00
parent 84b41aadf3
commit 04973bdfc7
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -370,6 +370,8 @@ func FetchCheckQueryOwnerScope(ctx context.Context, userCred mcclient.TokenCrede
if isAdmin && allowScope.HigherThan(rbacutils.ScopeProject) {
queryScope = allowScope
}
} else if action == policy.PolicyActionGet {
queryScope = allowScope
}
if resScope.HigherThan(queryScope) {
queryScope = resScope
+1 -1
View File
@@ -173,7 +173,7 @@ func (self *SRegion) CreateILoadBalancer(loadbalancer *cloudprovider.SLoadbalanc
"VpcId": loadbalancer.VpcID,
}
if loadbalancer.AddressType != api.LB_ADDR_TYPE_INTERNET {
if loadbalancer.AddressType != api.LB_ADDR_TYPE_INTERNET {
params["SubnetId"] = loadbalancer.NetworkID
}