MakeAPI should never display deleted makes

RESOLVED FIXED

Status

Webmaker
MakeAPI
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cade, Assigned: cade)

Tracking

Details

(Whiteboard: [MakeAPI])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
The Make API doesn't actually delete records, it marks them with a deletedAt timestamp.

I just realized that the search API will return deleted makes.

The server can add in a filter on all searches to ensures deleted Makes do not show in results.
(Assignee)

Comment 1

5 years ago
Although, Admins might want to override that... hmm.
Note: we should likely actually delete makes, assuming the UI for users is actually "delete".  There are possible privacy issues otherwise, and we may some day be legally bound to do such deletions.

(AKA: Why does the make API not actually delete records?)
(Assignee)

Comment 3

5 years ago
When I started on the code base, it's how it was originally set up.

Not sure why the decision was originally made to soft-delete records, but it's an easy fix to permanently remove them.
(Assignee)

Comment 4

5 years ago
:wex - what are your thoughts on moving to an actual delete of make records?
Flags: needinfo?(swex)

Comment 5

5 years ago
David is right from a data retention perspective. I hate not having the ability to undo a delete though.

:davida, if we did a hard delete for all Makes deleted over X days ago, would that satisfy your assertion?
Flags: needinfo?(swex)
Sure -- alternatively, have "Move to trash" and "Empty trash".

Comment 7

5 years ago
:cade I like a combination of these ^.

I don't think this is a requirement for June, but could you create (a) bug(s) for that feature?

 - hard delete everything that was deleted 14 days earlier (daily task)
 - make sure that you can update a make's deletedAt field to null (this is how we do undo delete)
 - make sure those with permission (creator of make & admins) can view deleted makes
 - figure out how to hard delete through the API

The admin UI and webmaker UI will then be able to "view trash", "restore from trash" and "empty trash"
(Assignee)

Comment 8

5 years ago
(In reply to Simon C. Wex from comment #7)
>  - hard delete everything that was deleted 14 days earlier (daily task)
Filed Bug #867982

>  - make sure that you can update a make's deletedAt field to null (this is
> how we do undo delete)
Filed Bug #867986

>  - make sure those with permission (creator of make & admins) can view
> deleted makes
This can be taken care of with this ticket.

>  - figure out how to hard delete through the API
I'll expose this while working on Bug #867982
(Assignee)

Comment 9

5 years ago
Created attachment 746942 [details] [review]
https://github.com/mozilla/MakeAPI/pull/50

I've modified the search so that it will always apply a filter for the deletedAt field.

I'll build on top of this in the other Delete related bugs.
Attachment #746942 - Flags: review?(swex)
Attachment #746942 - Flags: review?(schranz.m)
Comment on attachment 746942 [details] [review]
https://github.com/mozilla/MakeAPI/pull/50

Code is good.

R+
Attachment #746942 - Flags: review?(schranz.m) → review+
Duplicate of this bug: 879338
Blocks: 879796

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Updated

5 years ago
Attachment #746942 - Flags: review?(swex)
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.