Skip to content

Conversation

@jhtimmins
Copy link
Contributor

@jhtimmins jhtimmins commented Oct 5, 2021

This PR:

  • Updates the base security manager classes method names to use the action, resource, permission naming scheme.
  • Removes wrapper methods from the Airflow security manager that call the FAB methods previously using the old naming scheme.

This follows the work completed in #16647, where I copied the base FAB security manager classes into the Airflow codebase. This is a step forward in merging the Airflow-specific security manager code with the default FAB security manager code.

@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Oct 5, 2021
@jhtimmins jhtimmins force-pushed the use-new-fab-names-in-base-sm branch 2 times, most recently from 13b247f to ae1ec97 Compare October 5, 2021 16:20
@jhtimmins jhtimmins force-pushed the use-new-fab-names-in-base-sm branch from ae1ec97 to 0c297fa Compare October 18, 2021 20:17
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Oct 18, 2021
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

1 similar comment
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@jhtimmins jhtimmins force-pushed the use-new-fab-names-in-base-sm branch from 0c297fa to 1f591a0 Compare October 22, 2021 04:34
@jhtimmins jhtimmins merged commit 6deebec into apache:main Oct 22, 2021
@jhtimmins jhtimmins deleted the use-new-fab-names-in-base-sm branch October 22, 2021 05:58
sharon2719 pushed a commit to sharon2719/airflow that referenced this pull request Oct 27, 2021
…ault (apache#18726)

* Replace add_view_menu with create_resource.

* Replace add_permission_view_menu with create_permission.

* Replace find_permission_view_menu with get_permission.

* Replace find_view_menu with get_resource.

* Replace get_all_view_menu with get_all_resources.

* Replace find_permission with get_action.

* Replace del_permission_view_menu with delete_permission.

* Replace del_view_menu with delete_resource.

* Replace del_permission with delete_action.

* Replace add_permission_role with add_permission_to_role.

* Replace find_permissions_view_menu with get_resource_permissions.

* Replace self.del_permission_role wth remove_permission_from_role.

* Replace exist_permission_on_roles with permission_exists_in_one_or_more_roles.

* Replace find_roles_permission_view_menus with filter_roles_by_perm_with_action.

* Replace get_db_role_permissions with get_role_permissions_from_db.

* Replace add_permission with create_action.

* Remove unused exist_permission_on_view function.

* Rename local variables.

* Remove sqla model names from SecurityManager base class.

* Update names in add_permissions_view.

* Flake8.

* Use updated perm names.

* Use updated perm names for local vars.

* Use black.

* Reorder import statements.

* Remove accidental renaming of BaseSecurityManager.roles.
@ashb ashb added this to the Airflow 2.3.0 milestone Mar 31, 2022
@ephraimbuddy ephraimbuddy added changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) type:misc/internal Changelog: Misc changes that should appear in change log and removed changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) labels Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webserver Webserver related Issues full tests needed We need to run full set of tests for this PR to merge type:misc/internal Changelog: Misc changes that should appear in change log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants