Skip to content

Commit

Permalink
Fix approval role permission name in object diff.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Muresan,Bogdan,CH-Lausanne authored and bogdanmuresan committed Aug 6, 2024
1 parent a288e75 commit 6a3c083
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelogs/fragments/aapproval_role_name_object_diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
bugfixes:
- Fix "approval" role permission name in object diff.
...
6 changes: 5 additions & 1 deletion plugins/lookup/controller_object_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ def run(self, terms, variables=None, **kwargs):
item.update({"organizations": [item[item["resource_type"]]]})
if item["resource_type"] == "instance_group":
item.update({"instance_groups": [item[item["resource_type"]]]})
item.update({"role": item["name"].lower().replace(" ", "_").replace("ad_hoc", "adhoc")})
item.update({"role": item["name"].lower()
.replace(" ", "_")
.replace("ad_hoc", "adhoc")
.replace("approve", "approval")
})
# Remove the extra fields
item.pop("users")
item.pop("teams")
Expand Down

0 comments on commit 6a3c083

Please sign in to comment.