fix: network created by sysadmin should be shared by default

This commit is contained in:
Qiu Jian
2020-06-18 22:39:28 +08:00
parent a06b9c7884
commit 95413e8a02
+2 -2
View File
@@ -171,7 +171,7 @@ func SharableManagerValidateCreateData(
reqScope = rbacutils.ScopeSystem
} else {
input.IsPublic = nil
input.PublicScope = string(rbacutils.ScopeNone)
input.PublicScope = "" // string(rbacutils.ScopeNone)
}
case rbacutils.ScopeDomain:
if input.PublicScope == string(rbacutils.ScopeSystem) {
@@ -184,7 +184,7 @@ func SharableManagerValidateCreateData(
reqScope = rbacutils.ScopeSystem
} else {
input.IsPublic = nil
input.PublicScope = string(rbacutils.ScopeNone)
input.PublicScope = "" // string(rbacutils.ScopeNone)
}
default:
return input, errors.Wrap(httperrors.ErrInputParameter, "the resource is not sharable")