fix: a join update is allowed if one of the joint models is allowed to update

This commit is contained in:
Qiu Jian
2019-08-21 20:34:37 +08:00
parent 286754e5b0
commit f79df042bf
+1 -1
View File
@@ -72,7 +72,7 @@ func isObjectRbacAllowed(model IModel, userCred mcclient.TokenCredential, action
}
func isJointObjectRbacAllowed(item IJointModel, userCred mcclient.TokenCredential, action string, extra ...string) bool {
return isObjectRbacAllowed(item.Master(), userCred, action, extra...) && isObjectRbacAllowed(item.Slave(), userCred, action, extra...)
return isObjectRbacAllowed(item.Master(), userCred, action, extra...) || isObjectRbacAllowed(item.Slave(), userCred, action, extra...)
}
func isClassRbacAllowed(manager IModelManager, userCred mcclient.TokenCredential, objOwnerId mcclient.IIdentityProvider, action string, extra ...string) bool {