aboutsummaryrefslogtreecommitdiff
path: root/clientapi/auth/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'clientapi/auth/auth.go')
-rw-r--r--clientapi/auth/auth.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/clientapi/auth/auth.go b/clientapi/auth/auth.go
index b4c39ae3..c850bf91 100644
--- a/clientapi/auth/auth.go
+++ b/clientapi/auth/auth.go
@@ -70,11 +70,11 @@ func VerifyUserFromRequest(
jsonErr := jsonerror.InternalServerError()
return nil, &jsonErr
}
- if res.Err != nil {
- if forbidden, ok := res.Err.(*api.ErrorForbidden); ok {
+ if res.Err != "" {
+ if strings.HasPrefix(strings.ToLower(res.Err), "forbidden:") { // TODO: use actual error and no string comparison
return nil, &util.JSONResponse{
Code: http.StatusForbidden,
- JSON: jsonerror.Forbidden(forbidden.Message),
+ JSON: jsonerror.Forbidden(res.Err),
}
}
}