Oops — don’t worry about genus for non soubrettes.
This commit is contained in:
parent
cbb45c3fd7
commit
8a72ecae69
1 changed files with 3 additions and 1 deletions
|
@ -104,7 +104,9 @@ func (h authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
writeJSON(w, Error{errGenericError})
|
writeJSON(w, Error{errGenericError})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if mux.Vars(r)["genus"] != token.Claims["genus"] {
|
genus := mux.Vars(r)["genus"]
|
||||||
|
// We don't care about this if we aren't accessing one of the subrouter routes.
|
||||||
|
if genus != "" && genus != token.Claims["genus"] {
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
writeJSON(w, Error{errAccessDenied})
|
writeJSON(w, Error{errAccessDenied})
|
||||||
return
|
return
|
||||||
|
|
Reference in a new issue