Replies: 2 comments
-
Hi @stondini! I uploaded your scenario here: https://play.fga.dev/stores/create/?id=01HKRVGDZ886SJ58J9XR9547Z4
If i understood correctly, you want to forbid writing two tuples for one user, with different relations and objects? E.g.:
If that is the case, I don't think this is possible... @rhamzeh what do you think? You know more about modelling than me :) |
Beta Was this translation helpful? Give feedback.
-
Hi @miparnisari Let me clarify what I'd like to achieve. That said, my concern is about the expression to write to query the authorization system. Case of an allowed group:
Case of denied group:
As you can see, in both cases, the expression checks if the user is allowed. As pictures speak a thousand words, please find below a graphical representations of the model. Allowed case: Denied case: Hope it clarified the whole stuff :) Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm working with a system where a user is granted to groups of objects following 2 principles:
As example, let's say the user
bob
is granted to groupsA
andB
(among thousands of groups).So,
bob
is supposed to see all objecta that are link to groupsA
andB
. No issue with that.But, the user
alice
must not have access to groupsB
andC
. That means she has access to all other groups.I've tried to define the model like
where:
Also, as the
allowed
anddenied
relations are mutually exclusive, a user can't have both set. Either a group is allowed or denied.Some expected results are:
But the
is_granted
relation is not exactly the one I need because the exclusion operatorbut not
is not correct.I need something like
define is_granted: allowed or not denied
thatDo you think there is another way to implement such case ?
Many thanks,
Stephane
Beta Was this translation helpful? Give feedback.
All reactions