disabledAccountPathAllowed is what a disabled account may still do: sign out, and ask for its session state (which reports account_disabled).
(r *http.Request)
| 493 | // disabledAccountPathAllowed is what a disabled account may still do: sign |
| 494 | // out, and ask for its session state (which reports account_disabled). |
| 495 | func disabledAccountPathAllowed(r *http.Request) bool { |
| 496 | switch r.URL.Path { |
| 497 | case "/api/v1/auth/logout": |
| 498 | return r.Method == http.MethodPost |
| 499 | case "/api/v1/auth/session": |
| 500 | return r.Method == http.MethodGet |
| 501 | } |
| 502 | return false |
| 503 | } |
| 504 | |
| 505 | // RequireAuth middleware blocks unauthenticated requests when users exist |
| 506 | // in the system. When no users exist (fresh install), all requests pass |