signebedi / libreforms-fastapi

FastAPI implementation of the libreForms spec
GNU Affero General Public License v3.0
1 stars 1 forks source link

Improve group data model #154

Open signebedi opened 8 months ago

signebedi commented 8 months ago

It may be worth adding a last_edited timestamp field, and a last_edited_by foreign key > User.id field. This enables slightly better audit trail. Cf. all related transactions will be stored in the transaction log.

signebedi commented 7 months ago

However, deleting a group causes the group to be removed from users. I think maybe a better way handle deletion is to maybe add an is_deleted bool field, or to simply strip all permissions from a group on-delete. Or, both. Then, if a user is a member of a group that is deleted, it will show up on their profile, but we can add a (deleted) designation to show the group is inactive.