Skip to content

Commit

Permalink
fix: return 403 when non-admin tries to do admin requests
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Jul 9, 2024
1 parent 14667c3 commit ec4bf13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/graph/pkg/middleware/requireadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func RequireAdmin(rm *roles.Manager, logger log.Logger) func(next http.Handler)
return
}

errorcode.AccessDenied.Render(w, r, http.StatusUnauthorized, "Unauthorized")
errorcode.AccessDenied.Render(w, r, http.StatusForbidden, "Forbidden")
})
}
}

0 comments on commit ec4bf13

Please sign in to comment.