Closed ymc9 closed 2 months ago
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 | ✅ 3 resolved | Jul 14, 2024 2:12am |
The changes introduce the check()
attribute function in ZenStack schemas to streamline access policy definitions by delegating access control checks from child models to parent models. This enhances maintainability and clarity, reducing redundancy in access policy logic.
File | Change Summary |
---|---|
blog/check-function/index.md | Introduced check() attribute function for access control delegation, refactored Todo schema, proposed future enhancements. |
sequenceDiagram
participant User
participant ChildModel
participant ParentModel
User->>ChildModel: Request Access
ChildModel->>ParentModel: Delegate check() for Access Control
ParentModel-->>ChildModel: Return Access Decision
ChildModel-->>User: Provide Access Decision
blog/check-function/index.md
[grammar] ~22-~22: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”? Context: ... duplication pattern Consider a simple Todo application with two models: `List` and... (TO_DO_HYPHEN) --- [grammar] ~22-~22: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”? Context: ...application with two models: `List` and `Todo`. Each list can have multiple todos. Th... (TO_DO_HYPHEN) --- [grammar] ~22-~22: It appears that a hyphen is missing in the plural noun “to-dos”? Context: ...and `Todo`. Each list can have multiple todos. The author of a list has full access t... (TO_DO_HYPHEN) --- [uncategorized] ~22-~22: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short). Context: ... to it. A list can also be set as public so anyone can read it. A todo's access con... (COMMA_COMPOUND_SENTENCE_2) --- [grammar] ~22-~22: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”? Context: ... set as public so anyone can read it. A todo's access control is determined by its c... (TO_DO_HYPHEN) --- [grammar] ~22-~22: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”? Context: ...list: one has the same permissions to a todo as to its parent. Here's how a ZModel ... (TO_DO_HYPHEN) --- [grammar] ~54-~54: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”? Context: ...an easily spot, the access policies for `Todo` are almost identical to those for `Lis... (TO_DO_HYPHEN) --- [grammar] ~56-~56: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”? Context: ... control point of view, the child model `Todo` simply "follows" the parent model `Lis... (TO_DO_HYPHEN) --- [grammar] ~134-~134: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”? Context: ...pon in hand, we can easily refactor our Todo schema to eliminate the duplication: `... (TO_DO_HYPHEN)
blog/check-function/index.md (5)
`1-8`: **Metadata section looks good.** The metadata section is correctly formatted and contains all necessary information. --- `10-16`: **Introduction section looks good.** The introduction is clear and provides a good overview of the problem and the solution. --- `58-130`: **The `check()` function section looks good.** The section provides a clear explanation of the `check()` function and its usage with examples. --- `162-218`: **What's next? section looks good.** The section provides a good overview of potential future enhancements and invites feedback from the readers. --- `134-134`: **Fix grammatical issue.** There is an instance where a hyphen is missing in the noun "To-do". ```diff - With this new weapon in hand, we can easily refactor our Todo schema to eliminate the duplication: + With this new weapon in hand, we can easily refactor our To-do schema to eliminate the duplication: ``` > Likely invalid or redundant comment.Tools
LanguageTool
[grammar] ~134-~134: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”? Context: ...pon in hand, we can easily refactor our Todo schema to eliminate the duplication: `... (TO_DO_HYPHEN)
Summary by CodeRabbit
New Features
check()
function for access control delegation in ZenStack schemas. This improves maintainability by allowing access control checks to be delegated from child models to parent models.Refactor
check()
function, reducing duplication and enhancing clarity in access policy definitions.Future Enhancements
*-to-many
relations and handling of cyclic relations in access control delegation, aiming to further improve the functionality.