|
@@ -185,7 +185,7 @@ func (sh *securityHandler) forRole(w http.ResponseWriter, r *http.Request, role
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if in.Role != role {
|
|
if in.Role != role {
|
|
|
- httptypes.NewHTTPError(400, "Role JSON name does not match the name in the URL")
|
|
|
|
|
|
|
+ writeError(w, httptypes.NewHTTPError(400, "Role JSON name does not match the name in the URL"))
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
newrole, err := sh.sec.CreateOrUpdateRole(in)
|
|
newrole, err := sh.sec.CreateOrUpdateRole(in)
|
|
@@ -280,7 +280,7 @@ func (sh *securityHandler) forUser(w http.ResponseWriter, r *http.Request, user
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if u.User != user {
|
|
if u.User != user {
|
|
|
- httptypes.NewHTTPError(400, "User JSON name does not match the name in the URL")
|
|
|
|
|
|
|
+ writeError(w, httptypes.NewHTTPError(400, "User JSON name does not match the name in the URL"))
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
newuser, err := sh.sec.CreateOrUpdateUser(u)
|
|
newuser, err := sh.sec.CreateOrUpdateUser(u)
|