Remove k-space:board edit everything access
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
3c1e0edbf2
commit
a83b0c6ff6
@ -149,7 +149,7 @@ def check_edit_permission(item_id):
|
|||||||
user_groups = user.get("groups", [])
|
user_groups = user.get("groups", [])
|
||||||
if item.get("type") == "key" and "k-space:janitors" not in user_groups:
|
if item.get("type") == "key" and "k-space:janitors" not in user_groups:
|
||||||
return False
|
return False
|
||||||
if any(group in user_groups for group in ["k-space:board", "k-space:kubernetes:admins", "k-space:janitors"]):
|
if any(group in user_groups for group in ["k-space:kubernetes:admins", "k-space:janitors"]):
|
||||||
return True
|
return True
|
||||||
item_username = item.get("inventory", {}).get("owner", {}).get("username", False)
|
item_username = item.get("inventory", {}).get("owner", {}).get("username", False)
|
||||||
user_username = user.get("username", False)
|
user_username = user.get("username", False)
|
||||||
|
Loading…
Reference in New Issue
Block a user