mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
Check login is disabled before accessing default username
This commit is contained in:
parent
cb723acef7
commit
00e19399d7
@ -75,7 +75,8 @@ class AuthHandler < Kemal::Handler
|
||||
# this is why we check the default username first before checking the
|
||||
# token.
|
||||
should_reject = true
|
||||
if Storage.default.username_is_admin Config.current.default_username
|
||||
if Config.current.disable_login &&
|
||||
Storage.default.username_is_admin Config.current.default_username
|
||||
should_reject = false
|
||||
end
|
||||
if env.session.string? "token"
|
||||
|
Loading…
x
Reference in New Issue
Block a user