fix: avoid rejection when users are classified as administrators (#1941)

* fix(controller): decode old object for delete requests

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: modernize golang

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: modernize golang

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: modernize golang

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* fix: avoid rejection when users are classified as administrators

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>

---------

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
This commit is contained in:
Oliver Bähler
2026-06-02 14:17:27 +02:00
committed by GitHub
parent 827407eb05
commit b783d03f44
9 changed files with 151 additions and 39 deletions
+6
View File
@@ -15,6 +15,12 @@ func Deny(message string) *admission.Response {
return &response
}
func Allow(message string) *admission.Response {
response := admission.Allowed(message)
return &response
}
func normalizePath(p string) string {
if p == "" {
return ""