Skip to content

Commit 993c1a6

Browse files
committed
Add nesting
1 parent e862fd7 commit 993c1a6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

coderd/database/spice/policy/schema.zed

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ definition workspace {
154154
// The permissions come from the owning team roles, or individually granted
155155
// permissions. The individual grants must still be apart of the team.
156156
permission view =
157-
// Some perms require view as well
158-
edit + delete + select_template_version + ssh +
159-
// Give view permissons to any role that requires reading the workspace to conduct their actions.
160-
owner->view_workspaces + viewer
157+
// Some perms require view as well
158+
edit + delete + select_template_version + ssh +
159+
// Give view permissons to any role that requires reading the workspace to conduct their actions.
160+
owner->view_workspaces + viewer
161161
permission edit = owner->edit_workspaces + editor
162162
permission delete = owner->delete_workspaces + deletor
163163
// TODO: Maybe a caveat to check if the selected version is the active template version, and if that is allowed.
@@ -216,7 +216,7 @@ definition template {
216216
permission edit_pemissions = owner->manage_template_permissions
217217

218218
// Use is permitted by the owning team.
219-
permission use = owner
219+
permission use = owner + owner->parent
220220
}
221221

222222
definition template_version {
@@ -231,6 +231,8 @@ definition file {
231231
permission view = template_version -> view
232232
}
233233

234+
// TODO: How do we handle provisioners? Should we keep using tags?
235+
// Add actual relations?
234236
definition provisioner {
235237
// owning team for pulling permissions through.
236238
relation owner: team

0 commit comments

Comments
 (0)