Skip to content

Commit

Permalink
Fix storage layer order to expose redeem methods (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan authored Mar 14, 2023
1 parent 7d3adf6 commit 56f2c83
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apiserver/user/invitation_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 56f2c83

Please sign in to comment.