user U has relation R to object O
, where user U could be a simple user or a user set such as team X members.
In Permify, the simplest form of relational tuple structured as: entity # relation @ user
. Here are some relational tuples with semantics,
subject $ attribute | value
Here are some attributes with semantics,
account:1$balance|double:4000
- account:1’s balance is defined as 4000.post:546$is_restricted|boolean:true
- post:546 is labeled as restricted post within the system.user:122$regions|string[]:US,MEX
- user:122 is associated with regions United States and Mexico.document:2#owner@user:1
Write Data API
.
relation: “...”
used when subject type is different from user entity. #… represents a relation that does not affect the semantics of the tuple.Simply, the usage of … is straightforward: if you’re use user entity as an subject, you should not be using the ...
If you’re using another subject rather than user entity then you need to use the ...