Skip to content

Fixes #27487: Fix Glossary Import and Export buttons visibility for conditional permissions#27489

Open
aniruddhaadak80 wants to merge 1 commit intoopen-metadata:mainfrom
aniruddhaadak80:fix-glossary-import-export-permissions-27487
Open

Fixes #27487: Fix Glossary Import and Export buttons visibility for conditional permissions#27489
aniruddhaadak80 wants to merge 1 commit intoopen-metadata:mainfrom
aniruddhaadak80:fix-glossary-import-export-permissions-27487

Conversation

@aniruddhaadak80
Copy link
Copy Markdown

@aniruddhaadak80 aniruddhaadak80 commented Apr 17, 2026

Describe your changes:

Fixes #27487

I worked on resolving a bug where a user with conditional EditAll permissions mapped to their current Glossary (e.g., Data Producer) could not see the Import and Export buttons.

Previously, the buttons strictly validated against the global ResourceEntity.GLOSSARY_TERM instead of evaluating permissions.EditAll or permissions.All from the Glossary's own useGenericContext().

The Import and Export buttons now correctly consider the contextual conditions of the EditAll and All permissions, similar to other Manage action controls.


Type of change:

  • Bug fix

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • I have added a test that covers the exact scenario we are fixing.

Summary by Gitar

  • Feature enhancement:
    • Increased maxResultSize upper bound to 10,000 in queryRunner to accommodate larger data retrieval operations.

This will update automatically on new commits.

@aniruddhaadak80 aniruddhaadak80 requested a review from a team as a code owner April 17, 2026 15:37
Copilot AI review requested due to automatic review settings April 17, 2026 15:37
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@aniruddhaadak80 aniruddhaadak80 changed the title Fix Glossary Import/Export buttons visibility for conditional permissions Fixes #27487: Fix Glossary Import/Export buttons visibility for conditional permissions Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the Glossary header’s Import/Export buttons visibility when users have conditional permissions (e.g., conditional EditAll) on the currently viewed Glossary by checking the entity-scoped permissions from useGenericContext() instead of relying only on global UI permissions.

Changes:

  • Extend the Import/Export visibility check to allow permissions.All or permissions.EditAll from the Glossary’s useGenericContext() permissions.
  • Update the useMemo dependency list so the computed visibility updates when permissions changes.

@aniruddhaadak80 aniruddhaadak80 changed the title Fixes #27487: Fix Glossary Import/Export buttons visibility for conditional permissions Fixes #27487: Fix Glossary Import and Export buttons visibility for conditional permissions Apr 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Copy link
Copy Markdown
Author

@aniruddhaadak80 aniruddhaadak80 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged upstream main to fix stale CI errors (java-checkstyle, py-checkstyle, build).

Copilot AI review requested due to automatic review settings April 21, 2026 17:21
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 21, 2026

Code Review ✅ Approved

Restores visibility for Glossary import and export buttons by correctly applying conditional permission checks. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a UI permissions bug in the Glossary header where Import/Export actions were hidden for users whose EditAll permission was granted via conditional policies on the specific glossary entity, by incorporating entity-scoped permissions from useGenericContext() into the visibility check.

Changes:

  • Update Import/Export visibility logic to allow contextual permissions.All / permissions.EditAll in addition to global checkPermission(...) checks.
  • Update memo dependencies to include contextual permissions.

Comment on lines 130 to 145
@@ -139,7 +141,7 @@ const GlossaryHeader = ({
ResourceEntity.GLOSSARY_TERM,
globalPermissions
),
[globalPermissions]
[globalPermissions, permissions]
);
Comment on lines 131 to +133
() =>
permissions.All ||
permissions.EditAll ||
@aniruddhaadak80 aniruddhaadak80 force-pushed the fix-glossary-import-export-permissions-27487 branch from a9daffb to bcadbd0 Compare April 22, 2026 05:39
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Permissions: Import/Export functionality is Disabled by Conditions

2 participants