Merge pull request #211 from wansir/master

fix bug: rolebinding cannot delete
This commit is contained in:
zryfish
2018-11-23 14:37:54 +08:00
committed by GitHub
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
}