https://authzed.com logo
#spicedb
Title
# spicedb
n

niodice

10/14/2022, 6:11 PM
Is there a way to have a permission based on the document in which it's defined? I want to model a permission that should only be granted to the specific user's profile. Example:
Copy code
definition user {
    permission user_can_view_some_private_info = this // "this" could be replaced with "self" or something that points back to the user doc
}
I know I can set a
relation self: user
but it feels like there may be a built-in way to do this without needing to set that relationship?