Skip to content

[2.1] Give the ContextCenterPermission spec's article an owner - #38889

Merged
ShaileshParmar11 merged 1 commit into
2.1from
ShaileshParmar11/2.1-cc-permission-article-owner
Nov 26, 2026
Merged

ShaileshParmar11 merged 1 commit into
2.1from
ShaileshParmar11/2.1-cc-permission-article-owner

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Backport of #38888 to 2.1. Fixes the ContextCenterPermission Playwright failures that #38819 (the 2.1 backport of #38818, for #38800) exposes on 2.1. Port of the ContextCenterPermission part of #38887 (the 2.0 fix).

  • [2.1] Fixes #38800: Gate article header actions on the article's own permission #38819 gates the article header's owner, domain and delete actions on the open article's own permission instead of the resource-level one.
  • The spec's shared article had no owner. OrganizationPolicy-NoOwner-Rule allows EditOwners on any asset with no owner (noOwner()), so the article-level permission is EditOwners: allow for every user, and the server accepts that PATCH. edit-owner-btn is therefore correctly shown to the view-only, ViewAll-only and Data Consumer users, and the spec's "not visible" assertions fail. The UI is right; the spec is stale.
  • Fix: create the spec's article with the admin as owner, so the check is about EditOwners again.

The 2.0 PR also changed how the ViewAll-only and Data Consumer tests open the article. That part is not needed here: 2.1 already opens the spec's own article through openPermissionArticle. AuditLogs on 2.1 already selects getByTestId('description-content').

The spec on 2.1 is identical to main's, so this is a clean cherry-pick of #38888.

Type of change:

  • Bug fix

High-level design:

N/A — test-only change, 1 file.

Tests:

Use cases covered

  • A view-only, ViewAll-only or Data Consumer user cannot change the owners of an article that has an owner.

Unit tests

Not applicable (Playwright spec only).

Backend integration tests

  • Not applicable (no backend changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

Local Playwright run: FAILED

  • Commit: c022cd301a8e (base origin/main)
  • Started: 2026-11-26T16:47:25.527Z · Playwright 1.65.1 · 5.6 min
  • Totals: 80 passed, 1 failed, 0 flaky, 0 skipped across 6 selected specs
Spec Reason Passed Failed Flaky Skipped
playwright/e2e/Features/ContextCenterPermission.spec.ts changed 35 0 0 0
playwright/e2e/Features/Dashboards.spec.ts smoke 3 1 0 0
playwright/e2e/Flow/Navbar.spec.ts smoke 22 0 0 0
playwright/e2e/Pages/DataMarketplace.spec.ts smoke 5 0 0 0
playwright/e2e/Pages/Lineage/LineageControls.spec.ts smoke 9 0 0 0
playwright/e2e/Pages/Policies.spec.ts smoke 3 0 0 0
playwright/e2e/auth.setup.ts setup 1 0 0 0
playwright/e2e/entity-data.setup.ts setup 1 0 0 0
playwright/e2e/entity-data.teardown.ts setup 1 0 0 0
Command
cd openmetadata-ui/src/main/resources/ui
npx playwright test playwright/e2e/Features/ContextCenterPermission.spec.ts playwright/e2e/Features/Dashboards.spec.ts playwright/e2e/Flow/Navbar.spec.ts playwright/e2e/Pages/DataMarketplace.spec.ts playwright/e2e/Pages/Lineage/LineageControls.spec.ts playwright/e2e/Pages/Policies.spec.ts --workers=3
  • ContextCenterPermission.spec.ts: 35/35 passed. That includes the view-only, ViewAll-only and Data Consumer edit-owner-btn checks, which failed on the 2.0 nightly once the header was gated on the article's own permission.
  • The one failure is the smoke spec Dashboards.spec.ts:189 (expand / collapse should not appear after updating nested fields for dashboardDataModels). It fails on a rerun too: the tag picker search for PersonalData.Personal returns "No Tags are available" on this local stack's search index. That is local data, not this spec-only change, which touches no Dashboards code.

Manual testing performed

  1. Read the 2.0 nightly traces behind [2.0] Fix ContextCenterPermission and AuditLogs specs broken by the article-permission and Audit Logs backports #38887: resource-level EditOwners: conditionalAllow, article-level EditOwners: allow, article owners: [].
  2. Checked that no other test in this spec depends on the shared article having no owner. No test changes the article's owners. The EditAll user and the Data Steward still see edit-owner-btn through EditAll / EditOwners. The owner-only rules (isOwner(), !isOwner() && !noOwner()) target contextMemory only, not the article.

UI screen recording:

Not applicable (test-only change).

Checklist:

  • I have read CONTRIBUTING.md (the pre-review gate) and the contributor docs.
  • My PR title is Fixes <issue-number>: <short explanation> — test fix, no issue (skip-pr-checks).
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: reviewed the diff against REVIEW.md at 616cf50. No 🔴 findings. Test map: the changed file is a spec (its own test). Two 🟡 answered: the admin owner is not asserted (the view-only edit-owner-btn step fails if the owner is dropped, which is the guard), and the Data Steward still sees edit-owner-btn via EditOwners in DataStewardPolicy (same on 2.1).
  • Decision check: no durable decision; test data only.

🤖 Generated with Claude Code

#38818 (#38800) gates the article header's owner, domain and delete actions
on the open article's own permission. The spec's shared article had no owner,
and OrganizationPolicy-NoOwner-Rule lets any user set the owner of an unowned
asset, so edit-owner-btn is now correctly shown to view-only and Data Consumer
users. Create the article with the admin as owner so the check is about
EditOwners again.
@gitar-bot

gitar-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk

The Playwright spec now creates an admin-owned article, making its owner-permission assertions representative without changing production behavior.

Gives the shared ContextCenterPermission Playwright article an admin owner so the spec's edit-owner-btn visibility assertions check EditOwners permission again rather than an ownerless-asset rule. Test-only change to playwright/e2e/Features/ContextCenterPermission.spec.ts. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@ShaileshParmar11
ShaileshParmar11 merged commit ff03947 into 2.1 Nov 26, 2026
42 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the ShaileshParmar11/2.1-cc-permission-article-owner branch November 26, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants