Skip to content

Conversation

@migmartri
Copy link
Member

@migmartri migmartri commented Feb 28, 2024

This patch adds a set of improvements to the membership leaving mechanism, but the more important right now is the ability to auto-select a current org if the user has left another one.

  • It removes the CLI requirement that prevented leaving current organizations.
  • Makes sure that creating a new default membership unset the previous ones (membership.go)
  • Makes sure that an inline cas backend is configured when an user manually creates an organization, before it just worked for the automatically generated ones. (biz/organization.go)
  • the CurrentOrg method now makes sure to properly set the currentOrg, before it was doing a fallback to the first one without setting the actual flag. (biz/user.go)
  • Lastly, a on delete cascade has been added to make sure that when an organization is deleted, its associated apiTokens are removed too.
    Closes feat: revisit requirements to leave org #544

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri migmartri requested a review from danlishka February 28, 2024 19:37
@migmartri migmartri changed the title feat: auto-add to existing org chore: improvements on org management Feb 28, 2024
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Copy link
Member

@danlishka danlishka left a comment

Choose a reason for hiding this comment

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

LGTM, please change the auto-join to auto-select

@migmartri migmartri merged commit 30970ef into chainloop-dev:main Feb 29, 2024
@migmartri migmartri deleted the leave-org branch February 29, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: revisit requirements to leave org

2 participants