Skip to content

Commit

Permalink
Fix: custom roles contain a wrong permission MANAGE_BILLINGS (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerHeber committed Mar 5, 2023
1 parent 558c961 commit 64bd3c6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion env0/resource_custom_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func resourceCustomRole() *schema.Resource {
"READ_STATE",
"WRITE_STATE",
"FORCE_UNLOCK_WORKSPACE",
"MANAGE_BILLINGS",
"MANAGE_BILLING",
"VIEW_AUDIT_LOGS",
"MANAGE_ENVIRONMENT_LOCK",
}
Expand Down
27 changes: 26 additions & 1 deletion tests/integration/026_custom_role/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,32 @@ resource "env0_custom_role" "custom_role1" {
resource "env0_custom_role" "custom_role2" {
name = "custom-role-${random_string.random.result}2"
permissions = [
"EDIT_PROJECT_SETTINGS"
"VIEW_ORGANIZATION",
"EDIT_ORGANIZATION_SETTINGS",
"CREATE_AND_EDIT_TEMPLATES",
"CREATE_AND_EDIT_MODULES",
"CREATE_PROJECT",
"VIEW_PROJECT",
"EDIT_PROJECT_SETTINGS",
"MANAGE_PROJECT_TEMPLATES",
"EDIT_ENVIRONMENT_SETTINGS",
"ARCHIVE_ENVIRONMENT",
"OVERRIDE_MAX_TTL",
"CREATE_CROSS_PROJECT_ENVIRONMENTS",
"OVERRIDE_MAX_ENVIRONMENT_PROJECT_LIMITS",
"RUN_PLAN",
"RUN_APPLY",
"ABORT_DEPLOYMENT",
"RUN_TASK",
"CREATE_CUSTOM_ROLES",
"VIEW_DASHBOARD",
"VIEW_MODULES",
"READ_STATE",
"WRITE_STATE",
"FORCE_UNLOCK_WORKSPACE",
"MANAGE_BILLING",
"VIEW_AUDIT_LOGS",
"MANAGE_ENVIRONMENT_LOCK",
]
}

Expand Down

0 comments on commit 64bd3c6

Please sign in to comment.