Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redeem invitations #101

Merged
merged 8 commits into from
Feb 22, 2023
Merged

Redeem invitations #101

merged 8 commits into from
Feb 22, 2023

Conversation

bastjan
Copy link
Contributor

@bastjan bastjan commented Feb 15, 2023

Summary

Reference: https://kb.vshn.ch/appuio-cloud/references/architecture/control-api-invitation.html#_accepting_an_invitation

This PR adds a REDEEM endpoint to the invitation storage and adds a controller to handle adding the user to the specified targets.

The REDEEM endpoint adds a snapshot of the requested permissions to the status of the invitation and marks the invitation as redeemed.

The controller watches the snapshot and adds the user that has redeemed the invitation to the requested targets.

Note: Validation of those targets is out-of-scope and will be done in another ticket.

Checklist

  • PR contains a single logical change (to build a better changelog).
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog.

@bastjan bastjan marked this pull request as ready for review February 16, 2023 14:47
@bastjan bastjan requested review from glrf and a team February 16, 2023 16:37
Copy link
Member

@simu simu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, some smaller things inline

apis/user/v1/conversion.go Show resolved Hide resolved
controllers/invitation_redeem_controller.go Show resolved Hide resolved
apiserver/user/invitation_redeem.go Outdated Show resolved Hide resolved
apiserver/user/invitation_redeem.go Show resolved Hide resolved
Copy link
Contributor

@glrf glrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me quite a while to get what you're doing, but LGTM

@bastjan bastjan merged commit 2b336d9 into master Feb 22, 2023
@bastjan bastjan deleted the redeem-invitation branch February 22, 2023 08:36
@bastjan bastjan added the enhancement New feature or request label Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants