-
Notifications
You must be signed in to change notification settings - Fork 127
Ensure owner/mgmt permission for current user #3780
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
Conversation
12 failing tests:
|
b2f59df to
bb5413f
Compare
libs/dyn/visit_get.go
Outdated
| } | ||
|
|
||
| // Get1 returns the value without the error (InvalidValue indicates that error did happen) | ||
| func Get1(v Value, path string) Value { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we call it GetValue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, 236a550
| priorityPermission := mgmtPerms[0] | ||
| permissionToUpgrade := -1 | ||
|
|
||
| permissionArray := permissions.MustSequence() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use AsSequence instead and retirn error if it fails to convert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense; although we don't need an error, we can just skip it: 8f7a965
## Why Going to make some changes there, want to record how requests look like and how they will change. #3780
730857b to
c60359b
Compare
After merging main, the acceptance tests now reflect the new permissions behavior: - Automatically adds IS_OWNER permission for current user - This matches the changes from PR #3780
## Release v0.274.0 ### Bundles * Fix a panic in TF when it fails to read the job ([#3799](#3799)) * For secret scopes, no longer remove current user's permissions ([#3780](#3780)) * Automatically add owner permissions during bundle initialization, this makes final permissions visible in 'bundle validate -o json' ([#3780](#3780))
Changes
Instead of removing current user from permissions and relying on terraform to add it back, we'll instead add IS_OWNER/CAN_MANAGE ourselves.
Previous attempt to remove this mutator completely #3688 failed because backend complains about "ambiguous" permissions when both CAN_MANAGE and IS_OWNER are present. Thus we do additional transformation here: we upgrade CAN_MANAGE to IS_OWNER if we can.
Don't apply this logic to secret scopes resource as it's not implemented via databricks_permissions resource in terraform and does not have IS_OWNER/CAN_MANAGE insertion logic. This means we no longer filter out current user permissions from secret scopes resources.
Why
Tests
#3781