Skip to content

Conversation

@jiashengguo
Copy link
Member

@jiashengguo jiashengguo commented Jul 24, 2024

Summary by CodeRabbit

  • New Features
    • Introduced a comprehensive document exploring the limitations of Supabase's RLS for multi-tenancy SaaS applications.
    • Proposed ZenStack as a viable alternative, detailing its advantages in managing access policies directly within the data model.
    • Included a practical example using a ToDo application to illustrate challenges and solutions in implementing RLS.

@vercel
Copy link

vercel bot commented Jul 24, 2024

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

Name Status Preview Comments Updated (UTC)
zenstack-new-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2024 7:20am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 24, 2024

Walkthrough

The document introduces an exploration of Supabase's Row-Level Security (RLS) limitations in multi-tenancy SaaS applications, proposing ZenStack as an alternative. It details the evolution of Backend-as-a-Service platforms, highlights key access control challenges, and illustrates a practical example using a ToDo application. ZenStack's features offer improved developer experience and maintainability by integrating access controls directly into the data model, positioning it as a more user-friendly option compared to RLS.

Changes

Files Change Summary
blog/supabase-alternative/index.md Introduced a comprehensive exploration of Supabase RLS limitations and proposed ZenStack as an alternative, highlighting key challenges, a detailed ToDo application example, and the benefits of ZenStack.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Application
    participant Database

    Developer->>Application: Define access control policies
    Application->>Database: Request data with Row-Level Security (RLS)
    Database->>Application: Apply RLS rules and return data
    Application->>Developer: Provide data (with RLS applied)

    Developer->>Application: Define access control in ZenStack
    Application->>Database: Request data with ZenStack
    Database->>Application: Return data with integrated access control
    Application->>Developer: Provide data (with ZenStack access control)
Loading

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8a3bc43 and 209b565.

Files ignored due to path filters (1)
  • blog/supabase-alternative/cover.png is excluded by !**/*.png, !**/*.png
Files selected for processing (1)
  • blog/supabase-alternative/index.md (1 hunks)
Additional context used
LanguageTool
blog/supabase-alternative/index.md

[typographical] ~21-~21: It is considered good style to insert a comma after introductory phrases with dates or proper nouns.
Context: ...tion. It was acquired by Google, and at Google I/O in 2016, it announced an expans...

(IN_NNP_COMMA)


[grammar] ~66-~66: It appears that a hyphen is missing in the noun “To-Do” (= task) or did you mean the verb “to do”?
Context: ...based on their permissions. Let’s use a ToDo app to illustrate. ### Database Model ...

(TO_DO_HYPHEN)


[grammar] ~108-~108: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...ugh the relation table SpaceUser. - A Todo belongs to a User, and a List - A ...

(TO_DO_HYPHEN)


[duplication] ~108-~108: Possible typo: you repeated a word
Context: ...r. - A Todobelongs to aUser, and a List- AListbelongs to theUser, and a Sp...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~132-~132: To form a complete sentence, be sure to include a subject.
Context: ...d - can be read by the owner. - can be read by space members if not private...

(MISSING_IT_THERE)


[style] ~147-~147: ‘in the space of’ might be wordy. Consider a shorter alternative.
Context: ...s allowed to update - owner must be in the space of the current list - it doesn’t allow...

(EN_WORDINESS_PREMIUM_IN_THE_SPACE_OF)


[grammar] ~148-~148: Did you mean “changing”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ...the current list - it doesn’t allow to change owner ```sql create policy...

(ALLOW_TO)


[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...table. If the access control policy for Todo is the same as List, which is a very...

(TO_DO_HYPHEN)


[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ..., what policy do you need to create for Todo? The answer is that you have to dupli...

(TO_DO_HYPHEN)


[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...cate all the policies of the list for Todo. That’s definitely not DRY(Don’t repea...

(TO_DO_HYPHEN)


[grammar] ~213-~213: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...magine you're lucky enough to grow your Todo SaaS into a team collaboration platform...

(TO_DO_HYPHEN)


[grammar] ~217-~217: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...request that if a team member can see a Todo list, he will have full access to all t...

(TO_DO_HYPHEN)


[grammar] ~217-~217: It appears that a hyphen is missing in the plural noun “to-dos”?
Context: ...st, he will have full access to all the Todos under it, even the ones not owned by hi...

(TO_DO_HYPHEN)


[style] ~251-~251: Consider using a more polite way of asking this question.
Context: ...zation logic at the application level. Is it possible to bring back the convenience of not wr...

(IS_IT_POSSIBLE_TO)


[grammar] ~256-~256: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...nStack schema definitions of List and Todo you need to write for the ToDo apps. ...

(TO_DO_HYPHEN)


[grammar] ~256-~256: It appears that a hyphen is missing in the noun “To-Do” (= task) or did you mean the verb “to do”?
Context: ...tandTodo` you need to write for the ToDo apps. ```tsx abstract model BaseEntit...

(TO_DO_HYPHEN)


[grammar] ~404-~404: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ... Scalability Have you noticed that for Todo there is only one line of the policy r...

(TO_DO_HYPHEN)


[grammar] ~438-~438: It appears that a hyphen is missing in the noun “To-Do” (= task) or did you mean the verb “to do”?
Context: ...complete runnable project for this SaaS ToDo app: [https://github.com/zenstackhq/s...

(TO_DO_HYPHEN)

Markdownlint
blog/supabase-alternative/index.md

116-116: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


117-117: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


131-131: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


132-132: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


146-146: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


147-147: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


148-148: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


164-164: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


99-99: Column: 1
Hard tabs

(MD010, no-hard-tabs)


41-41: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


56-56: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


70-70: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


119-119: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


134-134: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


150-150: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


166-166: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


178-178: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


221-221: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


258-258: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


323-323: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


367-367: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


406-406: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


415-415: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)


430-430: Expected: indented; Actual: fenced
Code block style

(MD046, code-block-style)

Additional comments not posted (2)
blog/supabase-alternative/index.md (2)

3-3: Insert a comma after introductory phrases with dates or proper nouns.

It is considered good style to insert a comma after "Google I/O in 2016".

- at Google I/O in **2016** it announced an expansion
+ at Google I/O in **2016**, it announced an expansion

Likely invalid or redundant comment.


108-108: Fix repeated word "a".

Possible typo: you repeated the word "a".

- A `Todo` belongs to a `User`, and a `List`
+ A `Todo` belongs to a `User`, and a `List`.

Likely invalid or redundant comment.

Tools
LanguageTool

[grammar] ~108-~108: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...ugh the relation table SpaceUser. - A Todo belongs to a User, and a List - A ...

(TO_DO_HYPHEN)


[duplication] ~108-~108: Possible typo: you repeated a word
Context: ...r. - A Todobelongs to aUser, and a List- AListbelongs to theUser, and a Sp...

(ENGLISH_WORD_REPEAT_RULE)


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 16

TLDR: The team felt that BaaS was too limited for developers to build the next generation of web applications, so they pivoted it to the [Prisma ORM](https://www.prisma.io/orm).

It simplifies database interactions by providing a type-safe query builder, seamless migrations, and an intuitive data modeling language. While Prisma ORM does provide more flexibility compared to BaaS, it intentionally misses the access control layer as an ORM. Consequently, you have to switch back to implementing Authorization logic at the application level.

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using a more polite way of asking the question.

Consider using a more polite way of asking this question.

- Is it possible to bring back the convenience of not writing code for the Authorization like BaaS while maintaining the flexibility of a custom backend?
+ Could we bring back the convenience of not writing code for the Authorization like BaaS while maintaining the flexibility of a custom backend?
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Could we bring back the convenience of not writing code for the Authorization like BaaS while maintaining the flexibility of a custom backend?
Tools
LanguageTool

[style] ~251-~251: Consider using a more polite way of asking this question.
Context: ...zation logic at the application level. Is it possible to bring back the convenience of not wr...

(IS_IT_POSSIBLE_TO)


### 4. Maintainability

Let’s say we get a feature request that if a team member can see a Todo list, he will have full access to all the Todos under it, even the ones not owned by him.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- if a team member can see a Todo list
+ if a team member can see a To-Do list
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Let’s say we get a feature request that if a team member can see a Todo list, he will have full access to all the Todos under it, even the ones not owned by him.
Let’s say we get a feature request that if a team member can see a To-Do list, he will have full access to all the Todos under it, even the ones not owned by him.
Tools
LanguageTool

[grammar] ~217-~217: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...request that if a team member can see a Todo list, he will have full access to all t...

(TO_DO_HYPHEN)


[grammar] ~217-~217: It appears that a hyphen is missing in the plural noun “to-dos”?
Context: ...st, he will have full access to all the Todos under it, even the ones not owned by hi...

(TO_DO_HYPHEN)


Add a hyphen in "Todos" to form "To-Dos".

It appears that a hyphen is missing in the plural noun “To-Dos”.

- he will have full access to all the Todos under it
+ he will have full access to all the To-Dos under it
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Let’s say we get a feature request that if a team member can see a Todo list, he will have full access to all the Todos under it, even the ones not owned by him.
Let’s say we get a feature request that if a team member can see a Todo list, he will have full access to all the To-Dos under it, even the ones not owned by him.
Tools
LanguageTool

[grammar] ~217-~217: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...request that if a team member can see a Todo list, he will have full access to all t...

(TO_DO_HYPHEN)


[grammar] ~217-~217: It appears that a hyphen is missing in the plural noun “to-dos”?
Context: ...st, he will have full access to all the Todos under it, even the ones not owned by hi...

(TO_DO_HYPHEN)


Nothing explains better than code here.

Here is the complete runnable project for this SaaS ToDo app:
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- complete runnable project for this SaaS ToDo app:
+ complete runnable project for this SaaS To-Do app:
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Here is the complete runnable project for this SaaS ToDo app:
Here is the complete runnable project for this SaaS To-Do app:
Tools
LanguageTool

[grammar] ~438-~438: It appears that a hyphen is missing in the noun “To-Do” (= task) or did you mean the verb “to do”?
Context: ...complete runnable project for this SaaS ToDo app: [https://github.com/zenstackhq/s...

(TO_DO_HYPHEN)


### 3. Scalability

Have you noticed that for `Todo` there is only one line of the policy rule?
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- Have you noticed that for `Todo` there is only one line of the policy rule?
+ Have you noticed that for `To-Do` there is only one line of the policy rule?
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Have you noticed that for `Todo` there is only one line of the policy rule?
Have you noticed that for `To-Do` there is only one line of the policy rule?
Tools
LanguageTool

[grammar] ~404-~404: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ... Scalability Have you noticed that for Todo there is only one line of the policy r...

(TO_DO_HYPHEN)


- Read
- can be read by the owner.
- can be read by space members if not private.
Copy link
Contributor

Choose a reason for hiding this comment

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

Complete the sentence.

To form a complete sentence, be sure to include a subject.

- can be read by the owner.
+ It can be read by the owner.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- can be read by space members if not private.
- It can be read by space members if not private.
Tools
LanguageTool

[style] ~132-~132: To form a complete sentence, be sure to include a subject.
Context: ...d - can be read by the owner. - can be read by space members if not private...

(MISSING_IT_THERE)

Markdownlint

132-132: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


You might feel the aforementioned RLS for `List` is clear and straightforward, but that’s only for one table. If the access control policy for `Todo` is the same as `List`, which is a very common case, what policy do you need to create for `Todo`? The answer is that you have to duplicate all the policies of the `list` for `Todo`. That’s definitely not DRY(Don’t repeat yourself).

If you don't think it's a big deal, imagine you're lucky enough to grow your Todo SaaS into a team collaboration platform that manages various entities like dashboards, tasks, bugs, projects, etc.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- grow your Todo SaaS into a team collaboration platform
+ grow your To-Do SaaS into a team collaboration platform
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
If you don't think it's a big deal, imagine you're lucky enough to grow your Todo SaaS into a team collaboration platform that manages various entities like dashboards, tasks, bugs, projects, etc.
If you don't think it's a big deal, imagine you're lucky enough to grow your To-Do SaaS into a team collaboration platform that manages various entities like dashboards, tasks, bugs, projects, etc.
Tools
LanguageTool

[grammar] ~213-~213: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...magine you're lucky enough to grow your Todo SaaS into a team collaboration platform...

(TO_DO_HYPHEN)

- Update
- only the owner is allowed to update
- owner must be in the space of the current list
- it doesn’t allow to change owner
Copy link
Contributor

Choose a reason for hiding this comment

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

Correct the phrase "allow to change".

Did you mean “changing”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.

- it doesn’t allow to change owner
+ it doesn’t allow changing the owner
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- it doesn’t allow to change owner
- it doesn’t allow changing the owner
Tools
LanguageTool

[grammar] ~148-~148: Did you mean “changing”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ...the current list - it doesn’t allow to change owner ```sql create policy...

(ALLOW_TO)

Markdownlint

148-148: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


## Multi-Tenancy SaaS Example

Multi-tenancy is the classical pattern used in SaaS applications. An application can host many organizations, and users can join organizations and access resources based on their permissions. Let’s use a ToDo app to illustrate.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- Let’s use a ToDo app to illustrate.
+ Let’s use a To-Do app to illustrate.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Multi-tenancy is the classical pattern used in SaaS applications. An application can host many organizations, and users can join organizations and access resources based on their permissions. Let’s use a ToDo app to illustrate.
Multi-tenancy is the classical pattern used in SaaS applications. An application can host many organizations, and users can join organizations and access resources based on their permissions. Let’s use a To-Do app to illustrate.
Tools
LanguageTool

[grammar] ~66-~66: It appears that a hyphen is missing in the noun “To-Do” (= task) or did you mean the verb “to do”?
Context: ...based on their permissions. Let’s use a ToDo app to illustrate. ### Database Model ...

(TO_DO_HYPHEN)


That's why we built [ZenStack](https://zenstack.dev/) on top of Prisma ORM, adding the missing authorization layer and auto-generating type-safe APIs/hooks. It gives you the same convenience as using BaaS while maintaining flexibility with everything in your codebase.

Let’s cut the crap and see the code directly. Below are the equivalent ZenStack schema definitions of `List` and `Todo` you need to write for the ToDo apps.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- ZenStack schema definitions of `List` and `Todo` you need to write for the ToDo apps.
+ ZenStack schema definitions of `List` and `Todo` you need to write for the To-Do apps.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Let’s cut the crap and see the code directly. Below are the equivalent ZenStack schema definitions of `List` and `Todo` you need to write for the ToDo apps.
Let’s cut the crap and see the code directly. Below are the equivalent ZenStack schema definitions of `List` and `Todo` you need to write for the To-Do apps.
Tools
LanguageTool

[grammar] ~256-~256: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...nStack schema definitions of List and Todo you need to write for the ToDo apps. ...

(TO_DO_HYPHEN)


[grammar] ~256-~256: It appears that a hyphen is missing in the noun “To-Do” (= task) or did you mean the verb “to do”?
Context: ...tandTodo` you need to write for the ToDo apps. ```tsx abstract model BaseEntit...

(TO_DO_HYPHEN)


Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- ZenStack schema definitions of `List` and `Todo` you need to write for the ToDo apps.
+ ZenStack schema definitions of `List` and `To-Do` you need to write for the To-Do apps.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Let’s cut the crap and see the code directly. Below are the equivalent ZenStack schema definitions of `List` and `Todo` you need to write for the ToDo apps.
Let’s cut the crap and see the code directly. Below are the equivalent ZenStack schema definitions of `List` and `To-Do` you need to write for the To-Do apps.
Tools
LanguageTool

[grammar] ~256-~256: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...nStack schema definitions of List and Todo you need to write for the ToDo apps. ...

(TO_DO_HYPHEN)


[grammar] ~256-~256: It appears that a hyphen is missing in the noun “To-Do” (= task) or did you mean the verb “to do”?
Context: ...tandTodo` you need to write for the ToDo apps. ```tsx abstract model BaseEntit...

(TO_DO_HYPHEN)


### 3. Scalability

You might feel the aforementioned RLS for `List` is clear and straightforward, but that’s only for one table. If the access control policy for `Todo` is the same as `List`, which is a very common case, what policy do you need to create for `Todo`? The answer is that you have to duplicate all the policies of the `list` for `Todo`. That’s definitely not DRY(Don’t repeat yourself).
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- If the access control policy for `Todo` is the same as `List`
+ If the access control policy for `To-Do` is the same as `List`
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
You might feel the aforementioned RLS for `List` is clear and straightforward, but that’s only for one table. If the access control policy for `Todo` is the same as `List`, which is a very common case, what policy do you need to create for `Todo`? The answer is that you have to duplicate all the policies of the `list` for `Todo`. That’s definitely not DRY(Don’t repeat yourself).
You might feel the aforementioned RLS for `List` is clear and straightforward, but that’s only for one table. If the access control policy for `To-Do` is the same as `List`, which is a very common case, what policy do you need to create for `Todo`? The answer is that you have to duplicate all the policies of the `list` for `Todo`. That’s definitely not DRY(Don’t repeat yourself).
Tools
LanguageTool

[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...table. If the access control policy for Todo is the same as List, which is a very...

(TO_DO_HYPHEN)


[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ..., what policy do you need to create for Todo? The answer is that you have to dupli...

(TO_DO_HYPHEN)


[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...cate all the policies of the list for Todo. That’s definitely not DRY(Don’t repea...

(TO_DO_HYPHEN)


Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- duplicate all the policies of the `list` for `Todo`.
+ duplicate all the policies of the `list` for `To-Do`.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
You might feel the aforementioned RLS for `List` is clear and straightforward, but that’s only for one table. If the access control policy for `Todo` is the same as `List`, which is a very common case, what policy do you need to create for `Todo`? The answer is that you have to duplicate all the policies of the `list` for `Todo`. That’s definitely not DRY(Don’t repeat yourself).
You might feel the aforementioned RLS for `List` is clear and straightforward, but that’s only for one table. If the access control policy for `Todo` is the same as `List`, which is a very common case, what policy do you need to create for `Todo`? The answer is that you have to duplicate all the policies of the `list` for `To-Do`. That’s definitely not DRY(Don’t repeat yourself).
Tools
LanguageTool

[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...table. If the access control policy for Todo is the same as List, which is a very...

(TO_DO_HYPHEN)


[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ..., what policy do you need to create for Todo? The answer is that you have to dupli...

(TO_DO_HYPHEN)


[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...cate all the policies of the list for Todo. That’s definitely not DRY(Don’t repea...

(TO_DO_HYPHEN)


Add a hyphen in "ToDo" to form "To-Do".

It appears that a hyphen is missing in the noun “To-Do” (= task).

- what policy do you need to create for `Todo`?
+ what policy do you need to create for `To-Do`?
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
You might feel the aforementioned RLS for `List` is clear and straightforward, but that’s only for one table. If the access control policy for `Todo` is the same as `List`, which is a very common case, what policy do you need to create for `Todo`? The answer is that you have to duplicate all the policies of the `list` for `Todo`. That’s definitely not DRY(Don’t repeat yourself).
You might feel the aforementioned RLS for `List` is clear and straightforward, but that’s only for one table. If the access control policy for `Todo` is the same as `List`, which is a very common case, what policy do you need to create for `To-Do`? The answer is that you have to duplicate all the policies of the `list` for `Todo`. That’s definitely not DRY(Don’t repeat yourself).
Tools
LanguageTool

[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...table. If the access control policy for Todo is the same as List, which is a very...

(TO_DO_HYPHEN)


[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ..., what policy do you need to create for Todo? The answer is that you have to dupli...

(TO_DO_HYPHEN)


[grammar] ~211-~211: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...cate all the policies of the list for Todo. That’s definitely not DRY(Don’t repea...

(TO_DO_HYPHEN)

@jiashengguo jiashengguo merged commit b53d848 into main Jul 24, 2024
@jiashengguo jiashengguo deleted the jiasheng branch July 24, 2024 07:40
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.

2 participants