Closed Bug 867710 Opened 11 years ago Closed 11 years ago

MakeAPI should never display deleted makes

Categories

(Webmaker Graveyard :: MakeAPI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cade, Assigned: cade)

References

Details

(Whiteboard: [MakeAPI])

Attachments

(1 file)

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.
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?)
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.
:wex - what are your thoughts on moving to an actual delete of make records?
Flags: needinfo?(swex)
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".
: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"
(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
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+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: