From db1b707ec1d4068d4ed9ae44fbf39bc973aa9e19 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Sat, 27 Jun 2020 15:45:12 +0100 Subject: [PATCH] ignore users using alternative auth providers --- jellyfin_accounts/web_api.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/jellyfin_accounts/web_api.py b/jellyfin_accounts/web_api.py index 1d064fc..f7606e5 100644 --- a/jellyfin_accounts/web_api.py +++ b/jellyfin_accounts/web_api.py @@ -111,12 +111,20 @@ if ( and bool(data_store.user_template) is not False ): log.info("Updating user_template for Jellyfin >= 10.6.0") - data_store.user_template[ - "AuthenticationProviderId" - ] = "Jellyfin.Server.Implementations.Users.DefaultAuthenticationProvider" - data_store.user_template[ - "PasswordResetProviderId" - ] = "Jellyfin.Server.Implementations.Users.DefaultPasswordResetProvider" + if ( + data_store.user_template["AuthenticationProviderId"] + == "Emby.Server.Implementations.Library.DefaultAuthenticationProvider" + ): + data_store.user_template[ + "AuthenticationProviderId" + ] = "Jellyfin.Server.Implementations.Users.DefaultAuthenticationProvider" + if ( + data_store.user_template["PasswordResetProviderId"] + == "Emby.Server.Implementations.Library.DefaultPasswordResetProvider" + ): + data_store.user_template[ + "PasswordResetProviderId" + ] = "Jellyfin.Server.Implementations.Users.DefaultPasswordResetProvider" if config.getboolean("password_validation", "enabled"):