From 3c1e0edbf26415f280c7c89d3aae666f1b43a51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20M=C3=A4gi?= Date: Sun, 25 Aug 2024 15:13:44 +0300 Subject: [PATCH] Make k-space:janitors able to edit all items --- inventory-app/inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory-app/inventory.py b/inventory-app/inventory.py index e9dfbfc..b91485a 100644 --- a/inventory-app/inventory.py +++ b/inventory-app/inventory.py @@ -149,7 +149,7 @@ def check_edit_permission(item_id): user_groups = user.get("groups", []) if item.get("type") == "key" and "k-space:janitors" not in user_groups: return False - if any(group in user_groups for group in ["k-space:board", "k-space:kubernetes:admins"]): + if any(group in user_groups for group in ["k-space:board", "k-space:kubernetes:admins", "k-space:janitors"]): return True item_username = item.get("inventory", {}).get("owner", {}).get("username", False) user_username = user.get("username", False)