More auth
This commit is contained in:
parent
393f95aeac
commit
460162737a
9 changed files with 264 additions and 230 deletions
|
@ -1144,7 +1144,7 @@ func (s *Server) withAuth(next handleFunc, perm auth.Permission) handleFunc {
|
|||
}
|
||||
if err := s.auth.Authorize(user, t.ID, perm); err != nil {
|
||||
log.Printf("unauthorized: %s", err.Error())
|
||||
return errHTTPUnauthorized
|
||||
return errHTTPForbidden
|
||||
}
|
||||
return next(w, r, v)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue