Skip to content

Commit

Permalink
fix privilidge typo in volume permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanRademaker committed Dec 9, 2024
1 parent 28012bb commit 02ad3bf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def create_or_update_volume_permissions(
permission_changes = get_permission_changes(existing_grants, properties.privilege_assignments)

workspace_client.grants.update(
securable_type=SecurableType.VOLUME, full_name=properties.volume_name, changes=permission_changes
securable_type=SecurableType.VOLUME,
full_name=properties.volume_name,
changes=permission_changes,
)

return CnfResponse(
Expand All @@ -47,7 +49,9 @@ def delete_volume_permissions(properties: VolumePermissionsProperties, physical_
permission_changes = get_permission_changes(existing_grants, [])

workspace_client.grants.update(
securable_type=SecurableType.VOLUME, full_name=properties.volume_name, changes=permission_changes
securable_type=SecurableType.VOLUME,
full_name=properties.volume_name,
changes=permission_changes,
)

return CnfResponse(
Expand Down
2 changes: 1 addition & 1 deletion typescript/src/resources/permissions/volumePermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export enum PrivilegeVolume {

export interface PrivilegeAssignmentVolume {
principal: string
priviliges: Array<PrivilegeVolume>
privileges: Array<PrivilegeVolume>
}

export interface VolumePermissionsProperties {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("VolumePermissions", () => {
privilege_assignments: [
{
principal: "some-principal",
priviliges: [
privileges: [
PrivilegeVolume.APPLY_TAG,
PrivilegeVolume.READ_VOLUME,
PrivilegeVolume.WRITE_VOLUME,
Expand All @@ -22,7 +22,7 @@ describe("VolumePermissions", () => {
},
{
principal: "some-other-principal",
priviliges: [
privileges: [
PrivilegeVolume.APPLY_TAG,
PrivilegeVolume.READ_VOLUME,
]
Expand All @@ -46,7 +46,7 @@ describe("VolumePermissions", () => {
"privilege_assignments": [
{
"principal": "some-principal",
"priviliges": [
"privileges": [
"APPLY_TAG",
"READ_VOLUME",
"WRITE_VOLUME",
Expand All @@ -55,7 +55,7 @@ describe("VolumePermissions", () => {
},
{
"principal": "some-other-principal",
"priviliges": [
"privileges": [
"APPLY_TAG",
"READ_VOLUME"
]
Expand Down

0 comments on commit 02ad3bf

Please sign in to comment.