Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(admin-ui): Do not load pending search index updates if permissions are insufficient #2460

Conversation

jnugh
Copy link
Contributor

@jnugh jnugh commented Oct 17, 2023

The pending-search-index-updates executes a query that returns forbidden if neither ReadCatalog nor ReadProduct permissions are available. This loads to an automatic logout in admin-ui. This change prevents the call by adding a new configuration property to the configureAlert method. If any permission passed via requiredPermissions exists the alert is being created.
If not the alert will be registered if at some point the permission is added and userStatus updates.

Closes #2456

@netlify
Copy link

netlify bot commented Oct 17, 2023

Deploy Preview for effervescent-donut-4977b2 canceled.

Name Link
🔨 Latest commit a0718f4
🔍 Latest deploy log https://app.netlify.com/sites/effervescent-donut-4977b2/deploys/652e960e9d02730009816360

Copy link
Member

@michaelbromley michaelbromley left a comment

Choose a reason for hiding this comment

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

Thanks for taking on this issue! I really like your solution - I just have one point that needs checking.

@michaelbromley michaelbromley merged commit 08ad982 into vendure-ecommerce:master Oct 17, 2023
11 of 14 checks passed
@michaelbromley
Copy link
Member

Thanks for your help on this! 👍

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.

Job error of session for user with no product/category/job based permissions
2 participants