mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-18 18:16:26 +00:00
More unit tests and html coverage report
also fixes a limit bug on listquery
This commit is contained in:
@ -49,7 +49,7 @@ func Enforce(permission string) func(http.Handler) http.Handler {
|
||||
}
|
||||
|
||||
userID := uint(claims["uid"].(float64))
|
||||
_, enabled := user.IsEnabled(userID)
|
||||
_, enabled, _ := user.IsEnabled(userID)
|
||||
if token == nil || !enabled {
|
||||
h.ResultErrorJSON(w, r, http.StatusUnauthorized, "Unauthorised", nil)
|
||||
return
|
||||
|
@ -32,7 +32,7 @@ func SSEAuth(next http.Handler) http.Handler {
|
||||
}
|
||||
|
||||
userID := uint(claims["uid"].(float64))
|
||||
_, enabled := user.IsEnabled(userID)
|
||||
_, enabled, _ := user.IsEnabled(userID)
|
||||
if token == nil || !enabled {
|
||||
h.ResultErrorJSON(w, r, http.StatusUnauthorized, "Unauthorised", nil)
|
||||
return
|
||||
|
Reference in New Issue
Block a user