From 56f2c83a739ca4331e1eab074e4ee08bc6e66b0c Mon Sep 17 00:00:00 2001 From: Sebastian Widmer Date: Tue, 14 Mar 2023 17:08:34 +0100 Subject: [PATCH] Fix storage layer order to expose `redeem` methods (#126) --- apiserver/user/invitation_storage.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apiserver/user/invitation_storage.go b/apiserver/user/invitation_storage.go index af8b0d13..48be32ec 100644 --- a/apiserver/user/invitation_storage.go +++ b/apiserver/user/invitation_storage.go @@ -36,15 +36,16 @@ func NewInvitationStorage(backingNS, usernamePrefix string) restbuilder.Resource return nil, err } - stor = &invitationRedeemer{ + stor = &rbacCreatorIsOwner{ ScopedStandardStorage: stor, client: c, - usernamePrefix: usernamePrefix, } - stor = &rbacCreatorIsOwner{ + // Warning: Should be the last storage layer before authorization since it expands the interface with the Connecter interface + stor = &invitationRedeemer{ ScopedStandardStorage: stor, client: c, + usernamePrefix: usernamePrefix, } astor, err := authwrapper.NewAuthorizedStorage(stor, metav1.GroupVersionResource{