From 7effc02dda006bb29fa1a10c86e82b8ff9d6de9a Mon Sep 17 00:00:00 2001 From: Alice Grosch <a.grosch@fz-juelich.de> Date: Tue, 1 Aug 2023 11:48:37 +0200 Subject: [PATCH] Add image to allowed keys --- custom/4.0.0/handler/page_handlers.py | 2 -- custom/4.0.0/spawner/utils.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/4.0.0/handler/page_handlers.py b/custom/4.0.0/handler/page_handlers.py index 67f9438..a6ebfe5 100644 --- a/custom/4.0.0/handler/page_handlers.py +++ b/custom/4.0.0/handler/page_handlers.py @@ -17,7 +17,6 @@ class CustomHomeHandler(HomeHandler): authentication = await user.authenticator.update_auth_state_custom_config(authentication, set_service="JupyterLab", force=True) await user.save_auth_state(authentication["auth_state"]) await super().get() - user.authenticator.log.debug(f"Updated authentication in CustomHomeHandler: {authentication['auth_state']['service_active']}") class SimplePageHandler(BaseHandler): @@ -40,7 +39,6 @@ class CustomImageHandler(SimplePageHandler): await user.authenticator.update_auth_state_custom_config(authentication, set_service="CustomImage", force=True) await user.save_auth_state(authentication["auth_state"]) await super().get() - user.authenticator.log.debug(f"Updated authentication in CustomHomeHandler: {authentication['auth_state']['service_active']}") class LinksHandler(SimplePageHandler): diff --git a/custom/4.0.0/spawner/utils.py b/custom/4.0.0/spawner/utils.py index 268001e..b3e1695 100644 --- a/custom/4.0.0/spawner/utils.py +++ b/custom/4.0.0/spawner/utils.py @@ -25,6 +25,8 @@ def check_formdata_keys(data): required_keys = {"name", "service", "system"} if data.get("system") in unicore_systems: required_keys = required_keys | {"account", "project", "partition"} + if data.get("service") == "CustomImage": + required_keys = required_keys | {"image"} allowed_keys = required_keys | { "reservation", "nodes", -- GitLab