From 02ad3bf27f2889da12591e8576f3b3d86f9a74af Mon Sep 17 00:00:00 2001 From: Daan Rademaker Date: Mon, 9 Dec 2024 15:23:50 +0100 Subject: [PATCH] fix privilidge typo in volume permissions --- .../resources/permissions/volume_permissions.py | 8 ++++++-- typescript/src/resources/permissions/volumePermissions.ts | 2 +- .../tests/resources/permissions/volumePermissions.test.ts | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/aws-lambda/src/databricks_cdk/resources/permissions/volume_permissions.py b/aws-lambda/src/databricks_cdk/resources/permissions/volume_permissions.py index 0c18510e..86b8e870 100644 --- a/aws-lambda/src/databricks_cdk/resources/permissions/volume_permissions.py +++ b/aws-lambda/src/databricks_cdk/resources/permissions/volume_permissions.py @@ -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( @@ -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( diff --git a/typescript/src/resources/permissions/volumePermissions.ts b/typescript/src/resources/permissions/volumePermissions.ts index 0dcf4241..b1faddc5 100644 --- a/typescript/src/resources/permissions/volumePermissions.ts +++ b/typescript/src/resources/permissions/volumePermissions.ts @@ -10,7 +10,7 @@ export enum PrivilegeVolume { export interface PrivilegeAssignmentVolume { principal: string - priviliges: Array + privileges: Array } export interface VolumePermissionsProperties { diff --git a/typescript/tests/resources/permissions/volumePermissions.test.ts b/typescript/tests/resources/permissions/volumePermissions.test.ts index d10f6ac4..e3d3aadb 100644 --- a/typescript/tests/resources/permissions/volumePermissions.test.ts +++ b/typescript/tests/resources/permissions/volumePermissions.test.ts @@ -13,7 +13,7 @@ describe("VolumePermissions", () => { privilege_assignments: [ { principal: "some-principal", - priviliges: [ + privileges: [ PrivilegeVolume.APPLY_TAG, PrivilegeVolume.READ_VOLUME, PrivilegeVolume.WRITE_VOLUME, @@ -22,7 +22,7 @@ describe("VolumePermissions", () => { }, { principal: "some-other-principal", - priviliges: [ + privileges: [ PrivilegeVolume.APPLY_TAG, PrivilegeVolume.READ_VOLUME, ] @@ -46,7 +46,7 @@ describe("VolumePermissions", () => { "privilege_assignments": [ { "principal": "some-principal", - "priviliges": [ + "privileges": [ "APPLY_TAG", "READ_VOLUME", "WRITE_VOLUME", @@ -55,7 +55,7 @@ describe("VolumePermissions", () => { }, { "principal": "some-other-principal", - "priviliges": [ + "privileges": [ "APPLY_TAG", "READ_VOLUME" ]