mv get roles

Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
runzexia
2019-04-24 11:04:06 +08:00
committed by zryfish
parent 5a6f51d775
commit 68809bcc38
6 changed files with 70 additions and 221 deletions

View File

@@ -292,13 +292,14 @@ func ListNamespaceRules(req *restful.Request, resp *restful.Response) {
}
func ListDevopsRules(req *restful.Request, resp *restful.Response) {
devops := req.PathParameter("devops")
username := req.HeaderParameter(constants.UserNameHeader)
rules, err := iam.GetUserDevopsSimpleRules(username, devops)
rules, err, code := tenant.GetUserDevopsSimpleRules(username, devops)
if err != nil {
resp.WriteError(http.StatusInternalServerError, err)
resp.WriteError(code, err)
return
}