janjiss
10/02/2024, 2:20 PMyetitwo
10/02/2024, 2:39 PMyetitwo
10/02/2024, 2:40 PMtag
definitionyetitwo
10/02/2024, 2:41 PMyetitwo
10/02/2024, 2:42 PMtag
would play a similar role to a role_binding
in that exampleyetitwo
10/02/2024, 2:42 PMyetitwo
10/02/2024, 2:43 PMyetitwo
10/02/2024, 2:43 PMyetitwo
10/02/2024, 2:43 PMjanjiss
10/02/2024, 2:51 PMjanjiss
10/02/2024, 2:54 PMjanjiss
10/02/2024, 2:54 PMjanjiss
10/02/2024, 2:55 PMyetitwo
10/02/2024, 4:35 PMyetitwo
10/02/2024, 4:36 PMyetitwo
10/02/2024, 4:43 PMdefinition user {}
definition role {
relation user: user
// Using a self relation here lets us express a "boolean"
relation view: role
permission can_view = role->view & user
}
definition tag {
relation role: role
permission view = role->can_view
}
definition resource {
relation tag: tag
permission view = tag->view
}
yetitwo
10/02/2024, 4:43 PMyetitwo
10/02/2024, 4:43 PMyetitwo
10/02/2024, 4:44 PMdefinition tag {
relation role: role
permission view = role->can_view
}
you'd do something like
definition tag {
relation role: role
permission view = role.all(can_view)
}
yetitwo
10/02/2024, 4:45 PMyetitwo
10/02/2024, 4:45 PM