1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-09-01 17:44:51 +02:00

More auth

This commit is contained in:
Philipp Heckel 2022-01-24 00:54:28 -05:00
parent 393f95aeac
commit 460162737a
9 changed files with 264 additions and 230 deletions

View file

@ -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)
}