``` definition folder { relation parent: folde...
# spicedb
s
Copy code
definition folder {
    relation parent: folder
    relation viewer: user:* | user | group#members
    relation editor: user | group#actual_members
    relation admin: user | group#head
    permission read = viewer + editor + admin + parent->editor + parent->admin + parent->viewer
    permission edit = editor + admin + parent->editor + parent->admin
    permission create = editor + admin + parent->editor + parent->admin
    permission delete = admin + parent->admin
}

definition file {
    relation parent: folder
    relation viewer: user
    relation editor: user
    relation owner: user

    permission read = owner + viewer + editor + parent->viewer + parent->editor + parent->admin
    permission edit = owner + editor + parent->editor + parent->admin
    permission delete = owner + parent->admin
}
so the thing is, the file is supposed to inherit the permissions from its parent folder in 99% of cases. But I have a special case where the file is a "private file", where basically everyone is supposed to have rights on the folder to create files (editor), but noone should be able to see another persons file unless they get explicitly invited (so it should not be inherited), in all other cases, this inheritance that I have provided is exactly what I need. Is there a way to define this occurrence where the permissions should not be inherited, without messing up the rest of my cases and without defining a new resource only for this?