vatsrahul1001 commented on code in PR #45609:
URL: https://github.com/apache/airflow/pull/45609#discussion_r1923128585


##########
airflow/api_fastapi/common/db/common.py:
##########
@@ -179,3 +185,91 @@ def paginated_select(
     statement = apply_filters_to_select(statement=statement, 
filters=[order_by, offset, limit])
 
     return statement, total_entries
+
+
+def action_logging(event: str | None):

Review Comment:
   Agreed, moved to logging, decorators



##########
airflow/api_fastapi/common/db/common.py:
##########
@@ -179,3 +185,91 @@ def paginated_select(
     statement = apply_filters_to_select(statement=statement, 
filters=[order_by, offset, limit])
 
     return statement, total_entries
+
+
+def action_logging(event: str | None):
+    async def log_action(
+        request: Request,
+        session: SessionDep,
+        user: Annotated[BaseUser, Depends(get_user_with_exception_handling)],
+    ):
+        """Log user actions."""
+        if not user:
+            user_name = "anonymous"
+            user_display = ""
+        else:
+            # user_name = user.role
+            # user_display = user.username

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to