File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 3535
3636oidc = OpenIdConnect (openIdConnectUrl = KEYCLOAK_CONFIG .get ("openid_connect_url" ), auto_error = False )
3737
38- REVIEWER_ROLE = os .getenv ("REVIEWER_ROLE_NAME" )
39- ADMIN_ROLE = os .getenv ("ADMIN_ROLE_NAME" )
38+ REVIEWER_ROLE = os .getenv ("REVIEWER_ROLE_NAME" , "review_aiod_resources" )
39+ ADMIN_ROLE = os .getenv ("ADMIN_ROLE_NAME" , "admin_aiod_resources" )
4040client_secret = os .getenv ("KEYCLOAK_CLIENT_SECRET" )
4141
4242keycloak_openid = KeycloakOpenID (
Original file line number Diff line number Diff line change 11import copy
22import logging
3+ import os
34import pathlib
45import tomllib
56from collections import deque
1213_log_lines : deque [tuple [int , str ]] = deque ()
1314logger = logging .getLogger (__file__ )
1415
16+ _log_lines .append ((logging .INFO , f"REVIEWER_ROLE_NAME={ os .getenv ('REVIEWER_ROLE_NAME' )} " ))
17+ _log_lines .append ((logging .INFO , f"ADMIN_ROLE_NAME={ os .getenv ('ADMIN_ROLE_NAME' )} " ))
18+
1519default_config_path = pathlib .Path (__file__ ).parent / "config.default.toml"
1620with open (default_config_path , "rb" ) as fh :
1721 DEFAULT_CONFIG = tomllib .load (fh )
1822 _log_lines .append ((logging .INFO , f"Loaded default configuration from { default_config_path } " ))
19- logger .info ("Actually Foo" )
2023
2124OVERRIDE_CONFIG_PATH = pathlib .Path (__file__ ).parent / "config.override.toml"
2225if OVERRIDE_CONFIG_PATH .exists () and OVERRIDE_CONFIG_PATH .is_file ():
You can’t perform that action at this time.
0 commit comments