gramps-web-api icon indicating copy to clipboard operation
gramps-web-api copied to clipboard

Delete endpoint for trees

Open cdhorn opened this issue 1 year ago • 3 comments

In a multi-tenant environment a delete endpoint will be needed for users to delete their tree and any associated media items. Likely needed for GDPR compliance. (Did not check code, just glanced at API docs.)

cdhorn avatar Jun 30 '23 11:06 cdhorn

Other consideration in multi-user environment if user is deleted any trees and associated media of theirs also need to be cleaned up.

Other consideration not sure with GDPR what these things mean for user related data in context of backups.

cdhorn avatar Jun 30 '23 11:06 cdhorn

Other consideration not sure with GDPR what these things mean for user related data in context of backups.

Backups need to be deleted, too; for a server administrator, this means it makese sense to backup trees individually, so it's easy to delete all backups of a given tree.

DavidMStraub avatar Jun 30 '23 11:06 DavidMStraub

There are some subtleties to take into account:

  • currently, media files are never deleted. DELETE to /api/media/<handle> just deletes the media object from the db. This is perfectly in line with how Gramps handles it: Gramps never deletes files. My take on this so far was that anybody running a server with GDPR requirements would have to set up a script that regularly cleans dangling files
  • deleting a SQLite tree is easy, just delete the database dir, but for Postgres it's much more difficult. Gramps itself does not allow deleting(emptying a Postgres db. So also in that case, I wonder if it wouldn't be easier to have a server-side script, if needed for GDPR

DavidMStraub avatar Jun 30 '23 11:06 DavidMStraub