From 33a3dc61a33a3cc8a5560f4776e9080970f869a2 Mon Sep 17 00:00:00 2001 From: iFargle Date: Tue, 21 Feb 2023 16:27:40 +0900 Subject: [PATCH] test --- server.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server.py b/server.py index af363f7..b96ecbc 100644 --- a/server.py +++ b/server.py @@ -91,15 +91,15 @@ elif AUTH_TYPE == "basic": # Set Authentication type - Dynamically load function decorators # https://wiki.python.org/moin/PythonDecoratorLibrary#Enable.2FDisable_Decorators ######################################################################################## -def feature_flag(flag): - def decorator_feature_flag(func): +def auth_type(flag): + def decorator_auth_type(func): @wraps(func) - def wrapper_decorator_feature_flag(*args, **kwargs): + def wrapper_decorator_auth_type(*args, **kwargs): if flag is not "oidc": func(*args, **kwargs) oidc.require_login(func) - return wrapper_decorator_feature_flag - return decorator_feature_flag + return wrapper_decorator_auth_type + return decorator_auth_type ######################################################################################## # / pages - User-facing pages ########################################################################################