databricks-cli/bundle/permissions
shreyas-goenka d5dc2bd1ca
Filter current user from resource permissions (#1262)
## Changes
The databricks terraform provider does not allow changing permission of
the current user. Instead, the current identity is implictly set to be
the owner of all resources on the platform side.

This PR introduces a mutator to filter permissions from the bundle
configuration at deploy time, allowing users to define permissions for
their own identities in their bundle config.

This would allow configurations like, allowing both alice and bob to
collaborate on the same DAB:
```
permissions:
  level: CAN_MANAGE
  user_name: alice

  level: CAN_MANAGE
  user_name: bob
```

This PR is a reincarnation of
https://github.com/databricks/cli/pull/1145. The earlier attempt had to
be reverted due to metadata loss converting to and from the dynamic
configuration representation (reverted here:
https://github.com/databricks/cli/pull/1179)

## Tests
Unit test and manually
2024-03-11 15:05:15 +00:00
..
filter.go Filter current user from resource permissions (#1262) 2024-03-11 15:05:15 +00:00
filter_test.go Filter current user from resource permissions (#1262) 2024-03-11 15:05:15 +00:00
mutator.go Use resource key as name in permissions code (#1087) 2023-12-22 14:45:53 +00:00
mutator_test.go Use resource key as name in permissions code (#1087) 2023-12-22 14:45:53 +00:00
utils.go Added support for top-level permissions (#928) 2023-11-13 11:29:40 +00:00
workspace_root.go Added support for top-level permissions (#928) 2023-11-13 11:29:40 +00:00
workspace_root_test.go Use MockWorkspaceClient from SDK instead of WithImpl mocking (#1134) 2024-01-19 14:12:58 +00:00