Make k-space:janitors able to edit all items
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
68f65fc8eb
commit
3c1e0edbf2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user