funnel icon indicating copy to clipboard operation
funnel copied to clipboard

Store title (fullname) as a distinct column in ProposalMembership, ProjectSponsorMembership and ProposalSponsorMembership

Open jace opened this issue 3 years ago • 2 comments

These membership types serve two overlapping purposes:

  1. Grant access rights
  2. Grant moral credit without access rights

The latter case comes up when a collaborator in a submission must continue to receive credit after ceasing involvement, or a sponsor must be credited without authority to hide it. In such a case, deleting the account (or org) or even changing the name must NOT affect past credits.

Changes required:

  1. [x] Rename SponsorMembership to ProjectSponsorMembership
  2. [x] Add a title column to ProposalMembership, ProjectSponsorMembership and ProposalSponsorMembership
  3. [x] ~Set default value of title to copy subject User/Profile's title (in migration and in class __init__)~ Set default to None
  4. [x] Change User.do_delete and Profile.do_delete to NOT revoke active memberships in these classes (signalled using Class.revoke_on_subject_delete = False)
  5. [ ] Change membership forms to allow title to be edited, with a clear explanation of what the field is (eg: this person's full name for credit and citations)
  6. [ ] Change views to use this title instead of the subject's title. This may affect templates that render avatars and expect a User object.

jace avatar Jul 12 '22 19:07 jace

Since static representations are not always necessary, and can cause some confusion, an option:

Make title nullable, and make the model obtain it from the subject (shared functionality in a FrozenTitleMixin?). The title only needs to be set when a significant event occurs:

  1. [ ] A project editor or promoter added it to the record to freeze it.
  2. [ ] The user or org admin changed the name by editing the account/org. We can then intercept with a prompt, asking if they'd like to freeze the old name in existing records (title = null means unfrozen; after freeze the subject cannot change it, only owner can).
  3. [x] When deleting a subject (user or profile), the title is auto-frozen.

jace avatar Jul 13 '22 08:07 jace

There is an additional requirement for an archived record, where the subject continues to receive moral credit but no longer has access rights. Use case: when subject is a corporate employee or contractor whose term has ended.

jace avatar Dec 15 '22 10:12 jace