修正:1. attach权限校验总是false 2. 增加climc user

default_project_id相关方法
This commit is contained in:
Qiu Jian
2019-01-09 20:49:26 +08:00
parent e3766653f6
commit 606802b582
8 changed files with 38 additions and 12 deletions
+2 -2
View File
@@ -103,11 +103,11 @@ func (manager *SJointResourceBaseManager) FetchByIds(masterId string, slaveId st
}
func (manager *SJointResourceBaseManager) AllowListDescendent(ctx context.Context, userCred mcclient.TokenCredential, model IStandaloneModel, query jsonutils.JSONObject) bool {
return false
return IsAdminAllowList(userCred, manager)
}
func (manager *SJointResourceBaseManager) AllowAttach(ctx context.Context, userCred mcclient.TokenCredential, master IStandaloneModel, slave IStandaloneModel) bool {
return false
return IsAdminAllowCreate(userCred, manager)
}
func JointModelExtra(jointModel IJointModel, extra *jsonutils.JSONDict) *jsonutils.JSONDict {