-
Notifications
You must be signed in to change notification settings - Fork 12
DT-1202: Allow creating datasnapshot as a child resource of dataset #1640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b8264a0
a6ce39f
55e4e0f
153210d
353ab99
ab13315
afb49c0
7604e4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1335,6 +1335,12 @@ resourceTypes = { | |
"unlock_resource" = { | ||
description = "Can unlock a resource" | ||
} | ||
add_child = { | ||
description = "add a child resource" | ||
} | ||
list_children = { | ||
description = "list child resources" | ||
} | ||
} | ||
ownerRoleName = "steward" | ||
roles = { | ||
|
@@ -1343,14 +1349,17 @@ resourceTypes = { | |
includedRoles = ["custodian"] | ||
} | ||
custodian = { | ||
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"] | ||
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"] | ||
includedRoles = ["snapshot_creator"] | ||
descendantRoles = { | ||
datasnapshot = ["steward"] | ||
} | ||
} | ||
ingester = { | ||
roleActions = ["read_dataset", "read_data", "ingest_data"] | ||
} | ||
snapshot_creator = { | ||
roleActions = ["read_dataset", "read_data", "read_policies", "link_snapshot"] | ||
roleActions = ["read_dataset", "read_data", "read_policies", "link_snapshot", "add_child"] | ||
} | ||
admin = { | ||
roleActions = ["share_policy::steward", "read_policies", "alter_policies", "unlock_resource"] | ||
|
@@ -1437,18 +1446,24 @@ resourceTypes = { | |
add_child = { | ||
description = "add a child resource" | ||
} | ||
create_with_parent = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this action for? I think you probably want There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I got it from https://github.com/broadinstitute/sam/blob/develop/src/main/scala/org/broadinstitute/dsde/workbench/sam/model/SamModel.scala#L34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like when this was added in #1441, the README wasn't updated. I can switch to using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting. I guess you can keep your There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Well, TDR is the only user of |
||
description = "Enables creating a snapshot with a parent dataset" | ||
} | ||
get_parent = { | ||
description = "get parent of snapshot" | ||
} | ||
} | ||
ownerRoleName = "steward" | ||
roles = { | ||
steward = { | ||
roleActions = ["share_policy::steward", "share_policy::custodian", "update_passport_identifier", "view_journal"] | ||
roleActions = ["share_policy::steward", "share_policy::custodian", "update_passport_identifier", "view_journal", "create_with_parent"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't actually need to grant There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I tested this change in a bee, I found that it didn't work until I added I also tried adding Looking at the Scala code, in
It appears that this is what the code is requiring -- the action must directly be on the owner role. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering if the failure of this to work with included roles is a bug. Looking at the code path for the |
||
includedRoles = ["custodian"] | ||
descendantRoles = { | ||
snapshot-builder-request = ["approver"] | ||
} | ||
} | ||
custodian = { | ||
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"] | ||
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"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need "get_parent"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'll need it in the UI, to find out of a snapshot has a parent dataset which is providing steward users to the snapshot. The UI can use this to fetch and show the dataset custodian users as "inherited" stewards in the |
||
includedRoles = ["reader"] | ||
} | ||
reader = { | ||
|
Uh oh!
There was an error while loading. Please reload this page.