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

Unify access-control errors, and fix access-control types #7914

Merged
merged 19 commits into from
Oct 6, 2022

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented Sep 12, 2022

This pull request unifies most access-control errors to the following two messages:

You cannot ${operation} that ${listKey} - it may not exist
You cannot ${operation} that ${listKey} - you cannot ${operation} the fields ["${fieldKey}", ...]

This removes the burden of stringifying the inputData or the user provided filters in different scenarios.
That shouldn't be a problem, but, we can eliminate that risk with this.

The only differentiation of routine error types now is between list and fields.

This pull request additionally fixes a few unreleased type problems that were merged in #7848.

@vercel

This comment was marked as resolved.

@changeset-bot

This comment was marked as resolved.

@vercel vercel bot temporarily deployed to Preview September 12, 2022 07:33 Inactive
@codesandbox-ci

This comment was marked as resolved.

@vercel vercel bot temporarily deployed to Preview September 12, 2022 08:29 Inactive
@vercel vercel bot temporarily deployed to Preview September 12, 2022 08:36 Inactive
@vercel vercel bot temporarily deployed to Preview September 13, 2022 02:54 Inactive
@dcousens dcousens self-assigned this Oct 4, 2022
@vercel vercel bot temporarily deployed to Preview October 5, 2022 03:32 Inactive
@vercel vercel bot temporarily deployed to Preview October 5, 2022 03:46 Inactive
@vercel vercel bot temporarily deployed to Preview October 5, 2022 03:57 Inactive
@vercel vercel bot temporarily deployed to Preview October 5, 2022 04:50 Inactive
@dcousens dcousens force-pushed the access-control-types branch 2 times, most recently from b24745b to 22b47dd Compare October 5, 2022 05:01
@vercel vercel bot temporarily deployed to Preview October 5, 2022 05:03 Inactive
@vercel vercel bot temporarily deployed to Preview October 5, 2022 05:07 Inactive
@vercel vercel bot temporarily deployed to Preview October 5, 2022 05:18 Inactive
@vercel vercel bot temporarily deployed to Preview October 5, 2022 05:33 Inactive
@vercel vercel bot temporarily deployed to Preview October 5, 2022 05:37 Inactive
@vercel vercel bot temporarily deployed to Preview October 6, 2022 01:40 Inactive
@vercel vercel bot temporarily deployed to Preview October 6, 2022 02:36 Inactive
@dcousens dcousens changed the title Fixes wrong resultType for field level access control Unify access-control errors, and fix access-control types Oct 6, 2022
Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

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

Besides making the changeset more clear, this looks good to me

.changeset/errors-now-equal.md Outdated Show resolved Hide resolved
@dcousens dcousens enabled auto-merge (squash) October 6, 2022 03:54
@vercel vercel bot temporarily deployed to Preview October 6, 2022 03:56 Inactive
@dcousens dcousens merged commit c740ba6 into main Oct 6, 2022
@dcousens dcousens deleted the access-control-types branch October 6, 2022 04:03
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.

None yet

2 participants