Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for deleting entire sources #18

Closed
eloquence opened this issue Sep 11, 2018 · 7 comments
Closed

Add support for deleting entire sources #18

eloquence opened this issue Sep 11, 2018 · 7 comments

Comments

@eloquence
Copy link
Member

eloquence commented Sep 11, 2018

As a journalist, I want to be able to delete all files and messages associated with a source, so that I can reduce risks for the source and keep the number of submissions manageable for myself.

As shown in the "hamburger" menu of the messaging prototype, we should support deleting an entire source from the server, which would also delete it from all clients once they synchronize. It must be made clear to the user that deleting an entire source will prevent that source from logging in with their codename.

@eloquence
Copy link
Member Author

One idea under consideration is to introduce an in-between "trash" state, to reduce the potential confusion from suddenly disappearing sources. In most cases, sources would be moved to the trash before being deleted. Emptying the trash might require administrative privileges and/or happen automatically after an expiry window.

For the first iteration, that is not a must-have feature, but I'm flagging it here; ideally, we have resolved that question before implementation begins, so that we can develop the feature with the end state in mind.

@redshiftzero
Copy link
Contributor

For the purposes of syncing (#5), which is closely related to this, we'll proceed with the simplest variant, which is syncing with the server without a trash workflow. This will mean that if a source is deleted either on a client or on the server, after sync it's gone everywhere. I'm noting this in case we decide as part of this ticket (or a followup) to add such a trash workflow, the sync logic will need to be updated.

@eloquence eloquence added this to the 0.1alpha milestone Sep 11, 2018
@redshiftzero
Copy link
Contributor

some implementation notes from the sync discussion in #51:

important: for all the deletion actions, we need to be able to rollback. so we need to first update the UI and then only actually delete the item when we have confirmed the deletion on the server. implementation-wise this means we need to add a column for is_marked_for_deleted on the reply, submission, and source objects. the “delete” action locally would just be: marking source as deleted in the database. the UI should only display rows in each table that have not been marked as deleted.
if success: UI change stays in place. now we carry out the deletion of both the row and the files on disk.
if failure: mark the row as not marked for deletion, display to user that an error occurred deleting the object “try again" and update UI to reflect local db
if failure due to 404: sync API, object is deleted, report the object was deleted to user

@ultimatecoder
Copy link
Contributor

I am working on this at #78 The work is in progress. Will update here and at the PR as soon as I am done. Thanks!

ultimatecoder added a commit to ultimatecoder/securedrop-client that referenced this issue Oct 28, 2018
A Source Profile Short menu, which is responsible for displaying Source
name and Hamburger Button Menu. Hamburger button menu contains single
operation to delete the Source.

Resolves: freedomofpress#18
@ninavizz
Copy link
Member

Hi @ultimatecoder! This is the clickable prototype to demonstrate Delete functionality for Beta. Pls minimize as necessary, to fit to Alpha scope. https://invis.io/EUOVALO94RZ

My assumption is that most of what will make it into Alpha, will be limited to button actions, button labels, and text composed for dialogs. Yep, the "x" instead of a contextual menu on each individual file as the GUI control there, is new. If changing that from how you have it now is a lot of work, then don't worry about matching the "x" for Alpha.

"Export" from the contextual "• • •" menu at the top-right corner of the message pane, is not in scope for Alpha—but is shown in these. FYI.

I'll be online ~9am, and will check Gitter once I'm up and with coffee. Feel free to ping with questions! With Alpha being so limited in scope and @ntoll and @heartsucker being in European timezones, however, I expect they could provide you with better/quicker answers than myself.

Thank you, again, Jaysinh! :)

Nick/Erik: I trust your judgement(s) on how to best get essential things into Alpha to meet the release's goals. Being super-duper user-centric, I appreciate to be far lower on the list than DONE! :)

@ninavizz
Copy link
Member

Follow-up to discussion in Sprint planning: @redshiftzero @eloquence in my initial-stab of thinking through user-facing activity messages (for this and other things), I hadn't factored-in TOR things (beyond "everything will take a little longer") or all the API pings.

Would love to learn what all these steps are for deletion and other major user actions, to establish a consistent IFTT schema from which to pattern Client-wide user-facing language and timing of what's shown when. The "Delete Source" task sounds far more complicated for the Client than I'd anticipated, and seems like a great place to start.

Do NOT want to distract from getting Alpha out the door on time, but would love to do this properly to generate a messaging template for Beta. Thoughts?

@eloquence
Copy link
Member Author

eloquence commented Oct 31, 2018

For the purposes of the alpha, we should go with the simplest possible implementation, and only support deletion at the source level.

In terms of the "server operation fails / must roll back client state" scenario, I don't think it is unreasonable for this operation to block the whole client until it is successfully performed (and only then perform deletion on the client), certainly for the alpha. By "blocking" I mean showing an ugly modal window for now indicating that the operation is in progress, which in turn would make it impossible for the user to initialize any other actions at the same time.

If that doesn't in fact simplify implementation, then I don't see an issue with going with the rollback approach.

ultimatecoder added a commit to ultimatecoder/securedrop-client that referenced this issue Nov 5, 2018
A Source Profile Short menu, which is responsible for displaying Source
name and Hamburger Button Menu. Hamburger button menu contains single
operation to delete the Source.

Resolves: freedomofpress#18
ultimatecoder added a commit to ultimatecoder/securedrop-client that referenced this issue Nov 7, 2018
A Source Profile Short menu, which is responsible for displaying Source
name and Hamburger Button Menu. Hamburger button menu contains single
operation to delete the Source.

Resolves: freedomofpress#18
ultimatecoder added a commit to ultimatecoder/securedrop-client that referenced this issue Nov 7, 2018
A Source Profile Short menu, which is responsible for displaying Source
name and Hamburger Button Menu. Hamburger button menu contains single
operation to delete the Source.

Resolves: freedomofpress#18
ultimatecoder added a commit to ultimatecoder/securedrop-client that referenced this issue Nov 7, 2018
A Source Profile Short menu, which is responsible for displaying Source
name and Hamburger Button Menu. Hamburger button menu contains single
operation to delete the Source.

Resolves: freedomofpress#18
ultimatecoder added a commit to ultimatecoder/securedrop-client that referenced this issue Nov 7, 2018
A Source Profile Short menu, which is responsible for displaying Source
name and Hamburger Button Menu. Hamburger button menu contains single
operation to delete the Source.

Resolves: freedomofpress#18
@redshiftzero redshiftzero modified the milestones: 0.1.0alpha, 0.1.0beta Nov 12, 2018
ultimatecoder added a commit to ultimatecoder/securedrop-client that referenced this issue Nov 20, 2018
A Source Profile Short menu, which is responsible for displaying Source
name and Hamburger Button Menu. Hamburger button menu contains single
operation to delete the Source.

Resolves: freedomofpress#18
ultimatecoder added a commit to ultimatecoder/securedrop-client that referenced this issue Nov 20, 2018
A Source Profile Short menu, which is responsible for displaying Source
name and Hamburger Button Menu. Hamburger button menu contains single
operation to delete the Source.

Resolves: freedomofpress#18
legoktm pushed a commit that referenced this issue Dec 11, 2023
legoktm pushed a commit that referenced this issue Dec 11, 2023
Use qubesdb-read instead of gethostname
legoktm pushed a commit that referenced this issue Dec 15, 2023
Ensure source_uuid is added to Submission objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants