Skip to content

Commit fb3b270

Browse files
authored
Fix permissions logic not to add 2nd IS_OWNER (#3850)
## Changes When processing permissions, do not add 2nd IS_OWNER for current user. Bug introduced in #3780 ## Why It was always the intention. #3849 ## Tests Existing tests.
1 parent 9cdd556 commit fb3b270

File tree

11 files changed

+58
-55
lines changed

11 files changed

+58
-55
lines changed

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
### Dependency updates
1010

1111
### Bundles
12+
* Fix a permissions bug adding second IS\_OWNER and causing "The job must have exactly one owner." error. Introduced in 0.274.0. ([#3850](https://github.com/databricks/cli/pull/3850))
1213

1314
### API Changes

acceptance/bundle/resources/permissions/jobs/other_is_owner/out.plan.direct.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"user_name": "[email protected]"
4545
},
4646
{
47-
"permission_level": "IS_OWNER",
47+
"permission_level": "CAN_MANAGE",
4848
"user_name": "[USERNAME]"
4949
}
5050
]

acceptance/bundle/resources/permissions/jobs/other_is_owner/out.requests.deploy.direct.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"user_name": "[email protected]"
99
},
1010
{
11-
"permission_level": "IS_OWNER",
11+
"permission_level": "CAN_MANAGE",
1212
"user_name": "[USERNAME]"
1313
}
1414
]

acceptance/bundle/resources/permissions/jobs/other_is_owner/out.requests.deploy.terraform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"user_name": "[email protected]"
99
},
1010
{
11-
"permission_level": "IS_OWNER",
11+
"permission_level": "CAN_MANAGE",
1212
"user_name": "[USERNAME]"
1313
}
1414
]

acceptance/bundle/resources/permissions/jobs/other_is_owner/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"user_name": "[email protected]"
77
},
88
{
9-
"level": "IS_OWNER",
9+
"level": "CAN_MANAGE",
1010
"user_name": "[USERNAME]"
1111
}
1212
]

acceptance/bundle/resources/permissions/pipelines/other_is_owner/out.plan.direct.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"user_name": "[email protected]"
3232
},
3333
{
34-
"permission_level": "IS_OWNER",
34+
"permission_level": "CAN_MANAGE",
3535
"user_name": "[USERNAME]"
3636
}
3737
]

acceptance/bundle/resources/permissions/pipelines/other_is_owner/out.requests.deploy.direct.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"user_name": "[email protected]"
99
},
1010
{
11-
"permission_level": "IS_OWNER",
11+
"permission_level": "CAN_MANAGE",
1212
"user_name": "[USERNAME]"
1313
}
1414
]

acceptance/bundle/resources/permissions/pipelines/other_is_owner/out.requests.deploy.terraform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"user_name": "[email protected]"
99
},
1010
{
11-
"permission_level": "IS_OWNER",
11+
"permission_level": "CAN_MANAGE",
1212
"user_name": "[USERNAME]"
1313
}
1414
]

acceptance/bundle/resources/permissions/pipelines/other_is_owner/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"user_name": "[email protected]"
77
},
88
{
9-
"level": "IS_OWNER",
9+
"level": "CAN_MANAGE",
1010
"user_name": "[USERNAME]"
1111
}
1212
]

acceptance/bundle/run_as/pipelines_legacy/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Warning: You are using the legacy mode of run_as. The support for this mode is e
3333
"service_principal_name": "my_service_principal"
3434
},
3535
{
36-
"level": "IS_OWNER",
36+
"level": "CAN_MANAGE",
3737
"user_name": "[USERNAME]"
3838
}
3939
]

0 commit comments

Comments
 (0)