Skip to content

Test team scoping of plugin UI views in multi-team mode - #71805

Open
o-nikolas wants to merge 1 commit into
apache:mainfrom
aws-mwaa:onikolas/multi-team-plugins/ui-visibility
Open

Test team scoping of plugin UI views in multi-team mode#71805
o-nikolas wants to merge 1 commit into
apache:mainfrom
aws-mwaa:onikolas/multi-team-plugins/ui-visibility

Conversation

@o-nikolas

Copy link
Copy Markdown
Contributor

Plugin nav items, external views, and React apps are served to the UI through GET /api/v2/plugins, which already filters plugins by the user's authorized teams when multi-team mode is enabled. Because external_views and react_apps are nested in each plugin's response, they are scoped along with their plugin — a team-scoped plugin's views and apps are never sent to users outside that team.

That guarantee had no direct test coverage (existing tests used plugins without views). This adds TestGetPluginsUIViewTeamFiltering, which verifies that a user sees only their teams' (plus global) external views and React apps, that a user with no teams sees only global ones, and that all views are returned when multi-team mode is disabled.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Plugin nav items, external views, and React apps are served to the UI
through GET /api/v2/plugins, which already filters plugins by the user's
authorized teams when multi-team mode is enabled. Because external_views
and react_apps are nested in each plugin's response, they are scoped along
with their plugin — a team-scoped plugin's views and apps are never sent to
users outside that team.

That guarantee had no direct test coverage (existing tests used plugins
without views). This adds TestGetPluginsUIViewTeamFiltering, which verifies
that a user sees only their teams' (plus global) external views and React
apps, that a user with no teams sees only global ones, and that all views
are returned when multi-team mode is disabled.
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Aug 18, 2026
@o-nikolas
o-nikolas requested a review from vincbeck August 18, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants