Open lukasjuhrich opened 7 years ago
This touches the following behaviors:
room
s address) → Just leave what's in user.address
UserLogEntries
?When moving out, the following follow-up action should be considered:
A lot of management entities like logentries or an MT940Error
reference a processor
. It is unclear how that should be handled when the former admin e.g. demands deletion of his/her data.
One could consider splitting up an ArchivedUser
from a User
both inheriting from an AbstractUser
(RIP naming) following the following criteria:
User
is characterized by the ability to live in a room, being referenced for UserTask
s, requiring a UnixAccount
, and having Host
s and all the technical stuff to be introduced in #330 #331 #73 etc.AbstractUser
is characterized by the ability to have a finance_account, by requiring a name, and requiring an address. As mentioned above, possibly also by the ability to be referenced by Membership
s and LogEntries
ArchivedUser
is characterized by the ability to… optionally have a unix_account? At least nothing of importance here.Depending on the technical details, we could possibly drop the sibling construction and opt for a parent-child construction ProFormaUser←User
– „archiving“ would the mean dropping the polymorphic User
identity of a ProFormaUser
.
We want the following three-step model:
Regarding 3: whatever is later?
Yes, whatever is later. We want that both conditions are met (10y have passed + account balanced).
The purposes of the suggested phases would be:
It's not clear what 1. means however. The risk factors basically are:
A benefit of decoupling 1. from 2. is that one can easily intervene manually by removing / adding the “to be deleted” membership. Another question would be if realizing that with a membership wouldn't be overkill.
A last question would be: Do we want a manual audit mechanism for the users that are marked as “to be deleted”?
The big, big question is what the qualifier for marking for deletion should be.
User.room is None
would match too much, because (often active) members not living in a dorm anymore might be deletedUser.room is None and not User.hosts
also matches too much for the same reasonUser.room is None
&& there are no active group memberships finds too few users, because that does not catch cases where a user has e.g. been exempted from payments, and hence has one unbounded membershipPerhaps we should add a property keep_in_system
to groups like Aktiv
, Exaktiv
, Mitglied
, which we can do to augment variant 2?
- User.room is None && there are no active group memberships finds too few users, because that does not catch cases where a user has e.g. been exempted from payments, and hence has one unbounded membership
But the users that have a negative balance (and therefore may have the Zahlungsrückstand
group) shouldn't be deleted anyways or only at a later point (maybe 5 years?
The proposed lifecycle for users who have a negative balance would be:
to-be-archived
via some membershipI'm not quite clear over whether we actually need to keep the membership data for that long. Probably though, because it provides the basis for the monetary claims.
After a lenience period (say half a year), the user will be archived
There is already a fixed date for this: At the end of the next year that follows the EoM.
Example: Membership ends on 2021-07-01: Archiving will be done on 2023-01-01 Membership ends on 2022-01-01: Archiving will be done on 2024-01-01
An important suggestion raised by @marcelb98: in the deletion process, we might want to give a PDF-printout of all the user-ids (+ corresponding logins) that have been deleted so that we know which of the paper forms can be destroyed. Note that some of the oldest forms did not even have a user-id printed on it, which is why we require a login.
As to not create any more unneccessary digital data, we should not retain that information digitally and print it out + add it to the binders with the membership info.
If there would be a way to avoid the login
information that would be great; in that case, we might even go for an alternative workflow and just look which user ids are still in the membership table. We can obtain that estimate when doing the initial archiving and selecting for people who don't have the archived
property.
I wouldn't expect a lot of people (hence user-ids) to be left.
I don't know the current status, but I remember that the user-ids were added to the printed forms afterwards. But I could also be wrong, so we should just take a look at some old forms at the office.
Subtasks:
The last thing should be trivial as it should just delete users having the deleted
flag: in phase 2 a „deleted“ membership should be added proactively.
We should think about a procedure to delete users. The unix_account might be considered independent of this question.
Related Tasks:
470
(added later) Subtasks: