mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
* [#1349] Stub basic cookie authentication * [#1349] Basic login page Also adjusts WebView header color and shadow to match WebUI. WebUI uses a background-image gradient to change the perceived color, which was not noticed originally. * [#1349] Handle login post * [#1349] Redirect to previous URL * [#1349] Return a basic 401 for api endpoints Instead of redirecting to a visual login page, API should just indicate the bad state * Use more appropriate 303 redirect * Update server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com> * Update server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com> * Lint * Transition to AuthMode enum with migration path * Make basicAuthEnabled auto property, Lint * ConfigManager: Make sure to re-parse the config after migration * basicAuth{Username,Password} -> auth{Username,Password} * Lint * Update server settings backup model * Update comment * Minor cleanup * Improve backup legacy settings fix * Lint * Simplify config value migration --------- Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
This commit is contained in:
@@ -138,7 +138,7 @@ open class ConfigManager {
|
||||
* - adds missing settings
|
||||
* - removes outdated settings
|
||||
*/
|
||||
fun updateUserConfig() {
|
||||
fun updateUserConfig(migrate: ConfigDocument.(Config) -> ConfigDocument) {
|
||||
val serverConfig = ConfigFactory.parseResources("server-reference.conf")
|
||||
val userConfig = getUserConfig()
|
||||
|
||||
@@ -162,7 +162,11 @@ open class ConfigManager {
|
||||
)
|
||||
}.forEach { newUserConfigDoc = newUserConfigDoc.withValue(it.key, it.value) }
|
||||
|
||||
newUserConfigDoc =
|
||||
migrate(newUserConfigDoc, internalConfig)
|
||||
|
||||
userConfigFile.writeText(newUserConfigDoc.render())
|
||||
getUserConfig().entrySet().forEach { internalConfig = internalConfig.withValue(it.key, it.value) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user