Skip to content

Commit c24b03f

Browse files
DT-1202: Allow creating datasnapshot as a child resource of dataset (#1640)
- users with `snapshot_creator` or greater role on `dataset` can `add_child` to `dataset` - users with `custodian` or greater role on `dataset` can `list_children` - users with `steward` role can `create_with_parent` to `datasnapshot`, and `get_parent` - `dataset` `custodian` or greater role are `steward` on child `datasnapshot`s.
1 parent ff4c952 commit c24b03f

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

src/main/resources/reference.conf

+19-4
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,12 @@ resourceTypes = {
13351335
"unlock_resource" = {
13361336
description = "Can unlock a resource"
13371337
}
1338+
add_child = {
1339+
description = "add a child resource"
1340+
}
1341+
list_children = {
1342+
description = "list child resources"
1343+
}
13381344
}
13391345
ownerRoleName = "steward"
13401346
roles = {
@@ -1343,14 +1349,17 @@ resourceTypes = {
13431349
includedRoles = ["custodian"]
13441350
}
13451351
custodian = {
1346-
roleActions = ["manage_schema", "create_datasnapshot", "ingest_data", "soft_delete", "hard_delete", "unlink_snapshot", "list_snapshots", "lock_resource", "unlock_resource", "share_policy::custodian", "share_policy::ingester", "share_policy::snapshot_creator"]
1352+
roleActions = ["manage_schema", "create_datasnapshot", "ingest_data", "soft_delete", "hard_delete", "unlink_snapshot", "list_snapshots", "lock_resource", "unlock_resource", "share_policy::custodian", "share_policy::ingester", "share_policy::snapshot_creator", "list_children"]
13471353
includedRoles = ["snapshot_creator"]
1354+
descendantRoles = {
1355+
datasnapshot = ["steward"]
1356+
}
13481357
}
13491358
ingester = {
13501359
roleActions = ["read_dataset", "read_data", "ingest_data"]
13511360
}
13521361
snapshot_creator = {
1353-
roleActions = ["read_dataset", "read_data", "read_policies", "link_snapshot"]
1362+
roleActions = ["read_dataset", "read_data", "read_policies", "link_snapshot", "add_child"]
13541363
}
13551364
admin = {
13561365
roleActions = ["share_policy::steward", "read_policies", "alter_policies", "unlock_resource"]
@@ -1437,18 +1446,24 @@ resourceTypes = {
14371446
add_child = {
14381447
description = "add a child resource"
14391448
}
1449+
create_with_parent = {
1450+
description = "Enables creating a snapshot with a parent dataset"
1451+
}
1452+
get_parent = {
1453+
description = "get parent of snapshot"
1454+
}
14401455
}
14411456
ownerRoleName = "steward"
14421457
roles = {
14431458
steward = {
1444-
roleActions = ["share_policy::steward", "share_policy::custodian", "update_passport_identifier", "view_journal"]
1459+
roleActions = ["share_policy::steward", "share_policy::custodian", "update_passport_identifier", "view_journal", "create_with_parent"]
14451460
includedRoles = ["custodian"]
14461461
descendantRoles = {
14471462
snapshot-builder-request = ["approver"]
14481463
}
14491464
}
14501465
custodian = {
1451-
roleActions = ["delete", "edit_datasnapshot", "update_snapshot", "share_policy::reader", "share_policy::aggregate_data_reader", "share_policy::discoverer", "read_policies", "set_public", "update_auth_domain", "lock_resource", "unlock_resource"]
1466+
roleActions = ["delete", "edit_datasnapshot", "update_snapshot", "share_policy::reader", "share_policy::aggregate_data_reader", "share_policy::discoverer", "read_policies", "set_public", "update_auth_domain", "lock_resource", "unlock_resource", "get_parent"]
14521467
includedRoles = ["reader"]
14531468
}
14541469
reader = {

0 commit comments

Comments
 (0)