Repository navigation
Fixes #38345: gate Profile custom-properties delete on EditAll not Delete - #38382
Merged
Rohit0301 merged 1 commit intoNov 23, 2026
Conversation
Rohit0301
approved these changes
Nov 23, 2026
Rohit0301
deleted the
detail/bug-fix/fixes-38345-gate-profile-custom-properties-delete-02374a
branch
November 23, 2026 05:37
1 task done
Rohit0301
added a commit
that referenced
this pull request
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detail bug report: View on Detail
Describe your changes:
Fixes #38345
I worked on the Profile → Custom Properties panel's delete-button permission gate, because it was gating on the wrong operation and breaking custom-property deletion for asymmetrically-permissioned users on
type.The delete button in
CustomPropertiesDetailPagewas gated on the rawDeleteoperation, but deleting a custom property is a JSON PatchremoveonPATCH /metadata/types/{id}, which the backend authorizes asEditAll(no narrower field→operation mapping is registered forcustomPropertiesinResourceRegistry; verified byJsonPatchUtilsTest). So:Deleteontypesaw the delete action but it always failed with403 operations [EDIT_ALL] not allowed, leaving the confirm popover stuck open.EditAllbut notDeletehad a valid action hidden from them.The classic Settings custom-properties page (
CustomPropertiesPageV1→CustomPropertyTable) gates the identicaldeleteCustomPropertyByNameAPI onEditAlland was already correct — the Profile panel was the outlier.Fix: Gate the Panel's delete button on
canEditAll(matching the PATCH endpoint's authorization, the panel's own edit action, and the Settings page), and drop the now-unusedcanDeletefrom the derived flags. One-line change inCustomPropertiesDetailPage.tsx(canDelete={canEditAll}instead ofcanDelete={canDelete}).Type of change:
High-level design:
N/A — small change. One permission-gate change in one component, aligned with the existing backend contract and the sibling Settings page. Alternatives considered: registering a narrower field mapping for
customPropertiesinResourceRegistryand honoring it server-side soDeletecovers custom-property removal — rejected, because it would diverge thetyperesource's patch authorization from the rest of the codebase for a single UI call site, and the Settings page already assumesEditAll.Tests:
Use cases covered
EditAll(but notDelete) ontypesees both edit and delete actions in the Profile custom-properties panel and can delete successfully (the PATCH is satisfiable by EditAll).Deleteontypesees neither edit nor delete actions — preventing a visible button whose request always 403s withoperations [EDIT_ALL] not allowed.deleteCustomPropertyByNameAPI.canCreate; delete flow (name-addressedtest+removepatch, stale-index retry, resync on already-removed, success/error toasts, popover close behavior); sibling panels.Unit tests
openmetadata-ui/.../Profile/tabs/custom-properties/CustomPropertiesDetailPage.test.tsx— replaced the test that enshrined the bug (EditAll:false, Delete:true → delete visible) with two assertions: EditAll-only users see both edit and delete, and Delete-only users see neither (the regression guard).CustomPropertiesDetailPage.tsx94.73% lines (≥90% target), viayarn test:coverage.Backend integration tests
JsonPatchUtilsTest(25/25 passing) already proves the PATCH remove on/customProperties/<i>authorizes asEDIT_ALL.Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Pages/CustomProperties.spec.tsandFeatures/AIMode/CustomPropertiesPanel.spec.tscontinue to typecheck and lint clean.Manual testing performed
Could not complete a live end-to-end run against a running server in this environment. Attempted, with concrete results:
2.0.0-SNAPSHOT) are not published (manifest unknown), so the quickstart stack can't start as-is.GET /api/v1/system/version→2.1.0, but the dev-branch Playwright auth setup 404s on/api/v1/ingestionRunners, which only exists in the dev branch.target/classesagainst the running postgres + Elasticsearch; it connected and migrated but crashed during resource registration withUnhandledServerException: App Scheduler is not Initialized— a pre-existing wiring defect onmain(OpenMetadataApplication.run()callsAppScheduler.getInstance().start()without any priorAppScheduler.initialize(...)call on theservercommand path), unrelated to this UI fix.Unit tests and the backend contract test — which do not require a running server — fully cover the gate behavior, including the EditAll-only and Delete-only asymmetric cases.
UI screen recording:
Not applicable — standalone permission-gate fix (no new UI feature or visual change; only edit/delete menu-item visibility for edge-case permission sets). The visible menu items for default/admin/owner users (who carry both EditAll and Delete) are unchanged.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.docs/decisions/(see itsREADME.md). This description is gone fromgit logafter the squash-merge.Automatic Fixes PRs can be configured here.


Confidence Score: 5/5
This PR appears safe to merge.Summary
Fixes the Profile custom-properties delete action to use
EditAllinstead ofDelete.Reviews (1) · Last reviewed commit: "Fixes #38345: gate Profile custom-proper..." · Reviewed by Greptile