diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_current_user.py b/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_current_user.py index 66d21a4c..e4b524c2 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_current_user.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/scripts/get_current_user.py @@ -1,4 +1,4 @@ -"""Get_env.""" +"""Get current user.""" from typing import Any from flask import g @@ -10,8 +10,6 @@ from spiffworkflow_backend.scripts.script import Script class GetCurrentUser(Script): - """GetCurrentUser.""" - @staticmethod def requires_privileged_permissions() -> bool: """We have deemed this function safe to run without elevated permissions.""" diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/authorization_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/authorization_service.py index 9134a4ba..ed0eed27 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/authorization_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/authorization_service.py @@ -494,9 +494,7 @@ class AuthorizationService: user_attributes["username"] = fallback_username if "preferred_username" in user_info: - user_attributes["display_name"] = user_info[ - "preferred_username" - ] + user_attributes["display_name"] = user_info["preferred_username"] elif "nickname" in user_info: user_attributes["display_name"] = user_info["nickname"] elif "name" in user_info: @@ -510,9 +508,9 @@ class AuthorizationService: ): if tenant_specific_field in user_info: field_number = field_index + 1 - user_attributes[ - f"tenant_specific_field_{field_number}" - ] = user_info[tenant_specific_field] + user_attributes[f"tenant_specific_field_{field_number}"] = user_info[ + tenant_specific_field + ] if user_model is None: current_app.logger.debug("create_user in login_return")