fix bug: rolebinding cannot delete

This commit is contained in:
hongming
2018-11-22 16:53:57 +08:00
parent 49d40f48f7
commit a908757cfb
5 changed files with 102 additions and 65 deletions

View File

@@ -55,7 +55,7 @@ func RoleHandler(req *restful.Request, resp *restful.Response) {
workspaceName := req.PathParameter("name")
roleName := req.PathParameter("role")
if !slice.ContainsString(workspaces.WorkSpaceRoles, roleName, nil) {
if !slice.ContainsString(constants.WorkSpaceRoles, roleName, nil) {
resp.WriteHeaderAndEntity(http.StatusNotFound, constants.MessageResponse{Message: fmt.Sprintf("role %s not found", roleName)})
return
}