https://authzed.com logo
Title
a

AlexB

06/30/2022, 6:07 PM
I'm open to any definition that would solve the problem but if I define it like this
definition user {}

definition folder {}

definition file {
    relation parent: folder
    relation viewer: user

    permission view = viewer
}
I don't see a way to define a permission for the folder that would depend of its files and if I define it like this
definition user {}

definition folder {
    relation contents: file

    permission view = contents->view
}

definition file {
    relation viewer: user

    permission view = viewer
}
the
view
permission for a folder will be granted when any file is viewable (while I want that all of them are)