France-ioi / AlgoreaBackend

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

Update group: handle approval requirement changes #1039

Closed smadbe closed 7 months ago

smadbe commented 8 months ago

Motivations

The current update group service lets the user change the approval as he wants, but in practice, you should not be able to change the rules while some member has approved them already.

Subtasks

GeoffreyHuck commented 7 months ago

Do we put the same action in the group_membership_changes table (schema here: https://franceioi-algorea.s3.eu-west-3.amazonaws.com/dbdoc/tables/group_membership_changes.html) when:

smadbe commented 7 months ago

This group_membership_changes has become just a log. So we could use removed (as the membership has been removed by a manager) but if the goal is to be able to understand why a member is not member anymore probably an entry such as removed_due_to_approval_change may help.

GeoffreyHuck commented 7 months ago

What happens if the group in question have subgroups and a field is strengthtened?

smadbe commented 7 months ago

What happens if the group in question have subgroups and a field is strengthtened?

* Do we remove the subgroups?

No

* Do we remove the users in the subgroups?

No

Subgroups would be to difficult to manager, for instance if you add the group in another parent group, you would get a set of new approval rules, you would have to re-invite everybody, ...

smadbe commented 7 months ago

I have added (in the task description subtasks) 3 lines related with join/leave requests that may also be dropped if rules change (as the user approves the rules when creating the request)