Rewrite auth_handler

Make sure the OPDS pages are accessible without login when login is
disabled
This commit is contained in:
Alex Ling
2021-01-30 10:53:14 +00:00
parent d67a24809b
commit 4da263c594
3 changed files with 46 additions and 64 deletions

View File

@@ -48,14 +48,6 @@ class Storage
user_count = db.query_one "select count(*) from users", as: Int32
init_admin if init_user && user_count == 0
# Verifies that the default username in config is valid
if Config.current.disable_login
username = Config.current.default_username
unless username_exists username
raise "Default username #{username} does not exist"
end
end
end
unless @auto_close
@db = DB.open "sqlite3://#{@path}"