Skip to content

Conversation

@vincbeck
Copy link
Contributor

@vincbeck vincbeck commented Mar 6, 2025

Part of #47457.

Define a method in the auth manager interface get_menu_items so that auth managers can extend the menu if needed. By default, it returns an empty list.

I defined the method in the Fab auth manager to add 5 links to the menu:

  • List of users
  • List of roles
  • List of actions
  • List of resources
  • List of permissions

The return value of get_menu_items for FAB auth manager is:

[
	MenuItem(text = 'Users', href = '/auth/users/list/'),
	MenuItem(text = 'Roles', href = '/auth/roles/list/'),
	MenuItem(text = 'Actions', href = '/auth/actions/list/'),
	MenuItem(text = 'Resources', href = '/auth/resources/list/'),
	MenuItem(text = 'Permissions', href = '/auth/permissions/list/')
]

Once this PR merged, get_menu_items return value needs to be passed to the front-end and then these menu items can be added to the menu (I recommend to put them under a same category like "Auth").


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@vincbeck vincbeck force-pushed the vincbeck/additional_menu branch 2 times, most recently from 33615ea to 8c30f69 Compare March 6, 2025 22:01
@vincbeck vincbeck changed the title Add get_additional_menu_items in auth manager interface to extend the menu Add get_menu_items in auth manager interface to extend the menu Mar 6, 2025
@vincbeck vincbeck force-pushed the vincbeck/additional_menu branch 3 times, most recently from c833f7f to df1461a Compare March 10, 2025 14:12
@vincbeck vincbeck requested a review from jedcunningham March 10, 2025 17:21
@vincbeck vincbeck force-pushed the vincbeck/additional_menu branch 3 times, most recently from 4a340a9 to 8336a4b Compare March 11, 2025 16:39
@vincbeck vincbeck force-pushed the vincbeck/additional_menu branch from 8336a4b to 9b8d029 Compare March 11, 2025 17:43
@vincbeck
Copy link
Contributor Author

Errors are not related to this PR

@vincbeck vincbeck merged commit 0675231 into apache:main Mar 11, 2025
86 of 89 checks passed
@vincbeck vincbeck deleted the vincbeck/additional_menu branch March 11, 2025 18:58
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants