-
Notifications
You must be signed in to change notification settings - Fork 435
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
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
* next: test(sanity): update timeout to avoid slow test from being flaky (#7969) v3.66.1 fix(deps): update dependency @sanity/presentation to v1.19.7 (#7966) fix(core): guard against missing process variable (#7967) fix(sanity): reset search cursor state when any parameter changes (#7889) fix(deps): allow react v19 as peer dependency (#7962) v3.66.0 fix: reword warning about vector images not support crop/hotspot (#7960) fix(deps): Update dev-non-major (#7959) fix(core): add telemetry debug/noop logger (#7958) fix(deps): update dependency @sanity/presentation to v1.19.5 (#7957) fix(core): only open one annotation object edit modal at a time (#7898) fix(cli): remove v2 commands (#5750) feat(cli): generate read token conditionally for remote template (#7953) fix(deps): update dependency @sanity/mutate to ^0.11.1 (#7903) fix(deps): update dependency @sanity/ui to ^2.9.1 (#7948) feat(vision): link to edit documents on `_id`, `_ref` attributes (#6124) fix(core): disable scheduledPublishing and tasks if `/features` returns error (#7517) test(e2e): restore last e2e tests (#7926)
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.