sanity-io / sanity

Sanity Studio – Rapidly configure content workspaces powered by structured content
https://www.sanity.io
MIT License
4.96k stars 390 forks source link

feat: check user dataset grants during auth #6686

Open nkgentile opened 2 weeks ago

nkgentile commented 2 weeks ago

Description

When authenticating a user, the auth store will now also check that they have grants on the workspace's dataset.

What to review

This change affects workspace authentication. Entering or switching workspaces will make an additional check for the user's dataset grants.

Testing

I didn't add a test, since there aren't any existing test cases for this feature.

Notes for release

When authorizing a user, also check that they have dataset grants in the active workspace.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview May 16, 2024 11:31am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 11:31am
1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **studio-workshop** | ⬜️ Ignored ([Inspect](https://vercel.com/sanity-io/studio-workshop/HYweCTKmaGKAaXHwXYoLrPMj7NJ1)) | [Visit Preview](https://studio-workshop-git-fork-nkgentile-feature-check-dataset-grants.sanity.build) | | May 16, 2024 11:31am |
vercel[bot] commented 2 weeks ago

@nkgentile is attempting to deploy a commit to the Sanity Team on Vercel.

A member of the Team first needs to authorize it.