pierrejeambrun commented on code in PR #47681:
URL: https://github.com/apache/airflow/pull/47681#discussion_r2022695954


##########
airflow/api_fastapi/core_api/routes/ui/auth.py:
##########
@@ -31,7 +31,7 @@
 def get_auth_links(
     user: GetUserDep,
 ) -> MenuItemCollectionResponse:
-    menu_items = get_auth_manager().get_menu_items(user=user)
+    menu_items = get_auth_manager().get_extra_menu_items(user=user)

Review Comment:
   On the other hand `get_extra_menu_items` seems to take into account 
permissions with:
   ```python
           return [
               ExtraMenuItem(text=item["text"], href=item["href"])
               for item in items
               if self._is_authorized(method="MENU", 
resource_type=item["resource_type"], user=user)
           ]
   ```
   Not sure why we have two methods actually. But if we do maybe 
`get_extra_menu_items` shouldlist 'all menu items' independently of permissions 
and `get_authorized_menu_items` take into acount permissions. Therefore we need 
to update the endpoint to use `get_authorized_menu_items` ?



-- 
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