fix: class action 统一使用keywords包裹

This commit is contained in:
Qu Xuan
2020-03-17 18:44:10 +08:00
parent 12040bd5aa
commit 5dac5a465b
4 changed files with 26 additions and 17 deletions
+1 -5
View File
@@ -1331,11 +1331,7 @@ func managerPerformCheckCreateData(
query jsonutils.JSONObject,
data jsonutils.JSONObject,
) (jsonutils.JSONObject, error) {
body, err := data.(*jsonutils.JSONDict).Get(manager.Keyword())
if err != nil {
return nil, httperrors.NewGeneralError(err)
}
bodyDict := body.(*jsonutils.JSONDict)
bodyDict := data.(*jsonutils.JSONDict)
if consts.IsRbacEnabled() {
err := isClassRbacAllowed(manager, userCred, ownerId, policy.PolicyActionPerform, action)