France-ioi / AlgoreaBackend

Backend for the new Algorea platform
MIT License
1 stars 2 forks source link

`updateGroup` with strengthened approvals: fix "reinvite" doesn't properly create invitations #1098

Closed GeoffreyHuck closed 1 month ago

GeoffreyHuck commented 1 month ago

reinvite didn't work, because we didn't add the entries in table group_membership_changes.

I also realized a "transition" system was developed to handle those kind of changes. So the service was updated to use this transition system. For consistence and to make sure we don't end up with inconsistent states that messes up with the transition system.

Now the invitations should work as expected because the transition system takes care of it.

Two slight changes from before when the approval are strengthened:

I think those are the expected behaviors.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (3b06602) to head (6aa0a31).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1098 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 240 238 -2 Lines 14483 14455 -28 ========================================= - Hits 14483 14455 -28 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

smadbe commented 1 month ago

Two slight changes from before when the approval are strengthened:

* with `empty`:  `leave_request` doesn't stay `leave_request` but leaves the group

* with `reinvite`: `leave_request` leaves the group and doesn't get re-invited

I think those are the expected behaviors.

looks correct :+1: