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

Add an 'from all' modifier for relations #71

Open
aaguiarz opened this issue Dec 10, 2024 · 1 comment
Open

Add an 'from all' modifier for relations #71

aaguiarz opened this issue Dec 10, 2024 · 1 comment

Comments

@aaguiarz
Copy link
Member

In some cases, you want to make sure that user has a relation to every instance of another relation.

For example, Assume you have a recording of a meeting and an employee shall be able to view this resource, if he/she was a participant of the meeting or is the boss of all those employees.

type employee
  relations
    define boss: [employee]
 
type recording_of_meeting
  relations
    define participant_of_meeting: [employee]
    define can_access: participant_of_meeting or boss from participant_of_meeting

It would be useful to be able to define the relation as:

type employee
  relations
    define boss: [employee]
 
type recording_of_meeting
  relations
    define participant_of_meeting: [employee]
    define can_access: participant_of_meeting or boss from all participant_of_meeting

In that case we'll check if the employee is the boss of all participants.

https://github.com/orgs/openfga/discussions/400
openfga/openfga#2156

@wbcustc
Copy link

wbcustc commented Feb 3, 2025

We are blocked by this and have to change to use spiceDB because of the lack of from all support.
Really appreciate if we can get this feature supported soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants