Is there built-in way to reference the current obj...
# spicedb
b
Is there built-in way to reference the current object in the schema? I would like to do something along the lines of:
Copy code
definition user {
    relation platform: platform

    permission sensitive_action: self + platform->super_admin
}
I think adding an extra
self
relation would work but that involves creating the tuple for every object which is not ideal:
Copy code
definition user {
    relation self: user
    relation platform: platform

    permission sensitive_action: self + platform->super_admin
}
Is there any better way to do so (and/or would that even work)?
3 Views