append OPEN_ID to TENANT_SPECIFIC_FIELDS for clarification on what it is from w/ burnettk
This commit is contained in:
parent
df34d7865a
commit
fde9ac7f0c
|
@ -52,15 +52,15 @@ def load_config_file(app: Flask, env_config_module: str) -> None:
|
|||
|
||||
|
||||
def _set_up_tenant_specific_fields_as_list_of_strings(app: Flask) -> None:
|
||||
tenant_specific_fields = app.config.get("TENANT_SPECIFIC_FIELDS")
|
||||
tenant_specific_fields = app.config.get("OPEN_ID_TENANT_SPECIFIC_FIELDS")
|
||||
|
||||
if tenant_specific_fields is None or tenant_specific_fields == "":
|
||||
app.config["TENANT_SPECIFIC_FIELDS"] = []
|
||||
app.config["OPEN_ID_TENANT_SPECIFIC_FIELDS"] = []
|
||||
else:
|
||||
app.config["TENANT_SPECIFIC_FIELDS"] = tenant_specific_fields.split(",")
|
||||
if len(app.config["TENANT_SPECIFIC_FIELDS"]) > 3:
|
||||
app.config["OPEN_ID_TENANT_SPECIFIC_FIELDS"] = tenant_specific_fields.split(",")
|
||||
if len(app.config["OPEN_ID_TENANT_SPECIFIC_FIELDS"]) > 3:
|
||||
raise ConfigurationError(
|
||||
"TENANT_SPECIFIC_FIELDS can have a maximum of 3 fields"
|
||||
"OPEN_ID_TENANT_SPECIFIC_FIELDS can have a maximum of 3 fields"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -41,6 +41,11 @@ OPEN_ID_CLIENT_SECRET_KEY = environ.get(
|
|||
"OPEN_ID_CLIENT_SECRET_KEY", default="JXeQExm0JhQPLumgHtIIqf52bDalHz0q"
|
||||
) # noqa: S105
|
||||
|
||||
# Tenant specific fields is a comma separated list of field names that we will convert to list of strings
|
||||
# and store in the user table's tenant_specific_field_n columns. You can have up to three items in this
|
||||
# comma-separated list.
|
||||
OPEN_ID_TENANT_SPECIFIC_FIELDS = environ.get("OPEN_ID_TENANT_SPECIFIC_FIELDS")
|
||||
|
||||
SPIFFWORKFLOW_BACKEND_LOG_TO_FILE = (
|
||||
environ.get("SPIFFWORKFLOW_BACKEND_LOG_TO_FILE", default="false") == "true"
|
||||
)
|
||||
|
@ -89,11 +94,6 @@ ALLOW_CONFISCATING_LOCK_AFTER_SECONDS = int(
|
|||
environ.get("ALLOW_CONFISCATING_LOCK_AFTER_SECONDS", default="600")
|
||||
)
|
||||
|
||||
# Tenant specific fields is a comma separated list of field names that we will convert to list of strings
|
||||
# and store in the user table's tenant_specific_field_n columns. You can have up to three items in this
|
||||
# comma-separated list.
|
||||
TENANT_SPECIFIC_FIELDS = environ.get("TENANT_SPECIFIC_FIELDS")
|
||||
|
||||
SPIFFWORKFLOW_DEFAULT_USER_GROUP = environ.get(
|
||||
"SPIFFWORKFLOW_DEFAULT_USER_GROUP", default="everybody"
|
||||
)
|
||||
|
|
|
@ -504,7 +504,7 @@ class AuthorizationService:
|
|||
user_attributes["service_id"] = user_info["sub"]
|
||||
|
||||
for field_index, tenant_specific_field in enumerate(
|
||||
current_app.config["TENANT_SPECIFIC_FIELDS"]
|
||||
current_app.config["OPEN_ID_TENANT_SPECIFIC_FIELDS"]
|
||||
):
|
||||
if tenant_specific_field in user_info:
|
||||
field_number = field_index + 1
|
||||
|
|
Loading…
Reference in New Issue