From c022cd301a8e680267755d0a4228ec3b85df0f4f Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Thu, 26 Nov 2026 21:55:57 +0530 Subject: [PATCH] test(playwright): give the Context Center permission article an owner #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. --- .../e2e/Features/ContextCenterPermission.spec.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterPermission.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterPermission.spec.ts index 29ba36899430..50c6a6052a74 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterPermission.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterPermission.spec.ts @@ -211,10 +211,16 @@ test.describe('Context Center Permissions', () => { browser ); - articleEntity = new KnowledgeCenterClass({ - displayName: `CC Permission Article ${uuid()}`, - name: `cc_permission_article_${uuid()}`, - }); + // An article with no owner lets anyone set one (OrganizationPolicy-NoOwner-Rule), + // so own it to check that a user without EditOwners cannot change its owners. + const admin = await getLoggedInUser(apiContext); + articleEntity = new KnowledgeCenterClass( + { + displayName: `CC Permission Article ${uuid()}`, + name: `cc_permission_article_${uuid()}`, + }, + [{ id: admin.id, type: 'user' }] + ); await articleEntity.create(apiContext); await apiContext.post('/api/v1/contextCenter/drive/folders', {