File tree Expand file tree Collapse file tree 4 files changed +6
-8
lines changed
src/simcore_service_webserver/login Expand file tree Collapse file tree 4 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 125125
126126# App keys for login plugin
127127# Naming convention: APP_LOGIN_...KEY
128- APP_LOGIN_SETTINGS_PER_PRODUCT_KEY : Final [str ] = (
129- f"{ __name__ } .LOGIN_SETTINGS_PER_PRODUCT"
130- )
128+ LOGIN_SETTINGS_PER_PRODUCT_APPKEY : Final [str ] = f"{ __name__ } .LOGIN_SETTINGS_PER_PRODUCT"
131129
132130
133131# maximum amount the user can resend the code via email or phone
Original file line number Diff line number Diff line change 3939 twofa ,
4040)
4141from ._login_repository_legacy import APP_LOGIN_STORAGE_KEY , AsyncpgStorage
42- from .constants import APP_LOGIN_SETTINGS_PER_PRODUCT_KEY
42+ from .constants import LOGIN_SETTINGS_PER_PRODUCT_APPKEY
4343from .settings import (
4444 APP_LOGIN_OPTIONS_KEY ,
4545 LoginOptions ,
@@ -118,7 +118,7 @@ async def _resolve_login_settings_per_product(app: web.Application):
118118 raise ValueError (error_msg )
119119
120120 # store in app
121- app [APP_LOGIN_SETTINGS_PER_PRODUCT_KEY ] = login_settings_per_product
121+ app [LOGIN_SETTINGS_PER_PRODUCT_APPKEY ] = login_settings_per_product
122122
123123 # product-based public config: Overrides ApplicationSettings.public_dict
124124 public_data_per_product = {}
Original file line number Diff line number Diff line change 1010from settings_library .twilio import TwilioSettings
1111from simcore_postgres_database .models .products import ProductLoginSettingsDict
1212
13- from .constants import APP_LOGIN_SETTINGS_PER_PRODUCT_KEY
13+ from .constants import LOGIN_SETTINGS_PER_PRODUCT_APPKEY
1414
1515_DAYS : Final [float ] = 1.0 # in days
1616_MINUTES : Final [float ] = 1.0 / 24.0 / 60.0 # in days
@@ -147,7 +147,7 @@ def get_plugin_settings(
147147 app : web .Application , product_name : str
148148) -> LoginSettingsForProduct :
149149 """login plugin's settings are customized per product"""
150- settings = app [APP_LOGIN_SETTINGS_PER_PRODUCT_KEY ][product_name ]
150+ settings = app [LOGIN_SETTINGS_PER_PRODUCT_APPKEY ][product_name ]
151151 assert settings , "setup_settings not called?" # nosec
152152 assert isinstance (settings , LoginSettingsForProduct ) # nosec
153153 return settings
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def test_overwrite_user_preferences_defaults(
9191
9292@pytest .fixture
9393def mock_app (app_environment : EnvVarsDict ) -> Mock :
94- app = {APP_SETTINGS_APPKEY : Mock () }
94+ app = {}
9595 app [APP_SETTINGS_APPKEY ] = ApplicationSettings .create_from_envs ()
9696 return app # type: ignore
9797
You can’t perform that action at this time.
0 commit comments