Skip to content

Commit 31bd538

Browse files
authored
Merge pull request #1278 from gitlabhq/bugfix/issue-1267
resource/gitlab_branch_protection: Support `no one` in `unprotect_access_level`
2 parents 03831c1 + b8e2080 commit 31bd538

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/resources/branch_protection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ resource "gitlab_branch_protection" "main" {
9696
- `code_owner_approval_required` (Boolean) Can be set to true to require code owner approval before merging.
9797
- `merge_access_level` (String) Access levels allowed to merge. Valid values are: `no one`, `developer`, `maintainer`.
9898
- `push_access_level` (String) Access levels allowed to push. Valid values are: `no one`, `developer`, `maintainer`.
99-
- `unprotect_access_level` (String) Access levels allowed to unprotect. Valid values are: `developer`, `maintainer`.
99+
- `unprotect_access_level` (String) Access levels allowed to unprotect. Valid values are: `no one`, `developer`, `maintainer`.
100100

101101
### Read-Only
102102

internal/provider/access_level_helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var validProtectedBranchTagAccessLevelNames = []string{
5454
// The only access levels allowed to be configured to unprotect a protected branch
5555
// The API states the others are either forbidden (via 403) or invalid
5656
var validProtectedBranchUnprotectAccessLevelNames = []string{
57-
"developer", "maintainer",
57+
"no one", "developer", "maintainer",
5858
}
5959

6060
var validProtectedEnvironmentDeploymentLevelNames = []string{

0 commit comments

Comments
 (0)