Account Deletion (#716)

Adds ability to remove user account, wipes personal information and soft-deletes record.
This commit is contained in:
Tom Moor
2018-07-10 21:05:01 -07:00
committed by GitHub
parent f15ac0ee2a
commit 2d6f906b83
37 changed files with 254 additions and 79 deletions

View File

@ -141,8 +141,8 @@ Document.associate = models => {
{
include: [
{ model: models.Collection, as: 'collection' },
{ model: models.User, as: 'createdBy' },
{ model: models.User, as: 'updatedBy' },
{ model: models.User, as: 'createdBy', paranoid: false },
{ model: models.User, as: 'updatedBy', paranoid: false },
],
where: {
publishedAt: {
@ -156,8 +156,8 @@ Document.associate = models => {
Document.addScope('withUnpublished', {
include: [
{ model: models.Collection, as: 'collection' },
{ model: models.User, as: 'createdBy' },
{ model: models.User, as: 'updatedBy' },
{ model: models.User, as: 'createdBy', paranoid: false },
{ model: models.User, as: 'updatedBy', paranoid: false },
],
});
Document.addScope('withViews', userId => ({