Replies: 1 comment 3 replies
-
Hi @johakoch, the user is a tuple is different from the The The user in the tuple however, is different.
User, relation and object are the building blocks for relationship tuples. So if you want to indicate that a user of type - user: user:anne
relation: can_view
object: document:roadmap If you want to indicate that Charlie follows Beth, you can do: - user: user:charlie
relation: follows
object: user:beth You might have a user such as this: - user: subject:maths
relation: subject
object: topic:algorithms The user, relation and object in the tuple must be there, they form the three required elements of a tuple. The types and relations: Does this help? |
Beta Was this translation helpful? Give feedback.
-
When you add tuples or assertions in the playground, the text field for the thing that is related to the object is labeled "user".
In the default authorization model, which contains, amongst others, types "user", "folder" and "doc", this is ok in some cases (like e.g. tuple
user:u01 owner doc:d03
). However, in other cases, I think it's inappropriate (like e.g. tuplefolder:f05 parent folder:f03
, becausefolder:f05
is not a user).The concept of tuples in openfga looks very similar to RDF with its triples containing a subject, a predicate and an object. So, why not call the first part of the openfga tuple, a subject, which is a more general term as the (in some cases inappropriate) user?
I came along openfga only recently, so please bear with me, if my suggestion doesn't make sense.
Beta Was this translation helpful? Give feedback.
All reactions