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

chore: minor cleanup for memberships #4581

Merged
merged 1 commit into from
Apr 5, 2024
Merged

Conversation

fontanierh
Copy link
Contributor

Description

there's no "revoked" membership role anymore, so absence of membership alone determines if the auth RoleType should be "none"

Risk

Deploy Plan

@@ -352,7 +352,7 @@ export class MembershipResource extends BaseResource<MembershipModel> {
}

// If the membership is not terminated, we update the role in place.
// TODO(@fontanierh): check if we want to terminate + create a new membership with new role instead ?
// We do not historicize the roles.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we want to historicize the roles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a good reason to do it at the moment? It creates more rows in the db so if we dont use we might as well skip

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think those rows in the db would be costly 😄

I think it has value to know who had which role at a given moment, for example when debugging if you try to understand why a user was able to do something at some point while he's now only "member". Or if at some point we want to bill differently depending on the role but we're not there yet.

Truth is I "feel like it's cleaner" to have a new membership when you're promoted, but that's not a good enough reason to push for it 😄

Approving as is!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You convinced me ! But I won't trust the last minute change on memberships resource so won't do in this PR. Might do the change whenever I have a minute !

@fontanierh fontanierh merged commit 9afe568 into main Apr 5, 2024
3 of 4 checks passed
@fontanierh fontanierh deleted the chore/minor-cleanup branch April 5, 2024 12:36
flvndvd pushed a commit that referenced this pull request May 26, 2024
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.

2 participants