-
Notifications
You must be signed in to change notification settings - Fork 427
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(core): disable scheduledPublishing and tasks if /features
returns error
#7517
base: next
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
/features
returns error
/features
returns error/features
returns error
No changes to documentation |
Component Testing Report Updated Oct 22, 2024 9:09 AM (UTC) ✅ All Tests Passed -- expand for details
|
<Container width={1} paddingTop={4}> | ||
<Box paddingTop={4} paddingX={4}> | ||
<ErrorCallout | ||
description="You do not have permission to edit schedules." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for raising this! I've made changes to the backend API to avoid needing more permissions to read features, but this will still be nice for other errors.
acadbd8
to
dba6a31
Compare
Thanks for reviewing @rexxars So I think it would be better in this case to update the message to this - description="You do not have permission to edit schedules."
+ description="Something went wrong loading permissions, please try again."
- title="Insufficient permissions"
+ title="Permissions check failed" |
⚡️ Editor Performance ReportUpdated Tue, 22 Oct 2024 09:11:38 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
321ddc2
to
ed39607
Compare
Description
Some users have reported that they see the upsell ui even though the feature is enabled for the project.
That is due to the
features
api returning an error if the user doesn't have the right permissions to query it.This PR adds the same check for
scheduledPublishing
andtasks
plugins.In
comments
we are currently doing that check here https://github.com/sanity-io/sanity/blob/edx-1599/packages/sanity/src/core/comments/hooks/useResolveCommentsEnabled.ts#L42-L43What to review
Are this changes ok?
Testing
New tests have been introduced to guard this behavior.
Notes for release
Disable schedule publishing and tasks plugin if user doesn't have the right access.