Fixes #27487: Fix Glossary Import and Export buttons visibility for conditional permissions#27489
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
There was a problem hiding this comment.
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.Allorpermissions.EditAllfrom the Glossary’suseGenericContext()permissions. - Update the
useMemodependency list so the computed visibility updates whenpermissionschanges.
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
aniruddhaadak80
left a comment
There was a problem hiding this comment.
Merged upstream main to fix stale CI errors (java-checkstyle, py-checkstyle, build).
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedRestores visibility for Glossary import and export buttons by correctly applying conditional permission checks. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
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.EditAllin addition to globalcheckPermission(...)checks. - Update memo dependencies to include contextual
permissions.
| @@ -139,7 +141,7 @@ const GlossaryHeader = ({ | |||
| ResourceEntity.GLOSSARY_TERM, | |||
| globalPermissions | |||
| ), | |||
| [globalPermissions] | |||
| [globalPermissions, permissions] | |||
| ); | |||
| () => | ||
| permissions.All || | ||
| permissions.EditAll || |
a9daffb to
bcadbd0
Compare
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Describe your changes:
Fixes #27487
I worked on resolving a bug where a user with conditional
EditAllpermissions 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_TERMinstead of evaluatingpermissions.EditAllorpermissions.Allfrom the Glossary's ownuseGenericContext().The Import and Export buttons now correctly consider the contextual conditions of the
EditAllandAllpermissions, similar to other Manage action controls.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
maxResultSizeupper bound to 10,000 inqueryRunnerto accommodate larger data retrieval operations.This will update automatically on new commits.