permify
permify copied to clipboard
Refinement of Schema Files: Integrating Scenario-Specific Relationships and Attributes
Description
To improve our schema file structure for testing various user, company, organization, and team scenarios, we propose an enhancement that allows for scenario-specific definitions of relationships and attributes, while retaining the global definitions. This approach aims to provide both flexibility and efficiency in our testing process.
Current Schema Structure
Our schema file currently includes global definitions for entities, relationships, attributes, and scenarios. For example:
schema: |-
entity user {}
entity role {
relation assignee @user
}
// ... other entities and relations ...
relationships:
- dashboard:project-progress#view@role:admin#assignee
// ... other global relationships ...
attributes:
// ... global attributes ...
scenarios:
- name: "User Dashboard View Permissions"
// ... scenario details ...
// ... other scenarios ...
Proposed Enhancement
Retain Global Definitions: Keep the global definitions of relationships and attributes as they are for overarching applicability. Introduce Scenario-Specific Definitions: Allow for defining relationships and attributes within individual scenarios for more specific and contextual testing.
Example of Proposed Structure
scenarios:
- name: "User Dashboard View Permissions for project-progress"
description: "Verifies if user:1 has view access to the 'project-progress' dashboard."
relationships:
- dashboard:project-progress#view@role:admin#assignee
- dashboard:project-progress#view@role:member#assignee
// ... scenario-specific relationships ...
attributes:
// ... scenario-specific attributes ...
checks:
- entity: dashboard:project-progress
subject: user:1
assertions:
view: true
// ... other scenarios ...
Goals
Dual Flexibility: Maintain the efficiency of global definitions while providing the flexibility of scenario-specific configurations. Clarity and Specificity: Enhance clarity in complex scenarios by allowing specific relationship and attribute definitions. Streamlined Testing: Facilitate more focused and accurate scenario testing.
Action Items
- Assess the current schema file structure and identify areas for integration of scenario-specific definitions.
- Develop a prototype schema incorporating these changes.
- Test and validate the effectiveness of the new schema structure.
- Update documentation to guide the use of both global and scenario-specific definitions.
/bounty $200
💎 $200 bounty • Permify.co
Steps to solve:
-
Start working: Comment
/attempt #838
with your implementation plan -
Submit work: Create a pull request including
/claim #838
in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
Don't wait to be assigned. A reward will be given for the best PR.
Thank you for contributing to Permify/permify!
Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🔴 @scshiv29-dev | Nov 14, 2023, 2:18:21 PM | WIP |
🟢 @akhill10 | Nov 14, 2023, 7:59:18 PM | WIP |
🔴 @saifxd7 | Nov 15, 2023, 7:21:31 AM | WIP |
🟢 @aazam-gh | #1113 |
As @scshiv29-dev canceled his attempt.
I want to take this up. @scshiv29-dev let me know if you're still working on it
/attempt #838
Options
Note: The user @akhill10 is already attempting to complete issue #838 and claim the bounty. If you attempt to complete the same issue, there is a chance that @akhill10 will complete the issue first, and be awarded the bounty. We recommend discussing with @akhill10 and potentially collaborating on the same solution versus creating an alternate solution.
Hi @akhill10, I'm assigning this issue to you since @scshiv29-dev cancelled his attempt. Happy hacking ✌🏻
/attempt #838
@EgeAytin is this still open?
@EgeAytin May I work on this issue? If not working anyone.
Hi @akhill10, is there any progress on this ?
I'm unassigning @akhill10 due to inactivity. @melsonic , if you are still interested in contributing, I can assign the task to you.
Sure
Adding my name in queue.
💡 @aazam-gh submitted a pull request that claims the bounty. You can visit your bounty board to reward.