Skip to content

Commit

Permalink
user message: if decryption fails, they may need to talk to an admin
Browse files Browse the repository at this point in the history
This is because the issue could be that the workstation was
provisioned with the incorrect submission key
  • Loading branch information
redshiftzero committed Mar 8, 2019
1 parent 4dd2f49 commit 0154854
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions securedrop_client/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,8 @@ def on_file_downloaded(self, result, current_object):
except CryptoError as e:
logger.debug('Failed to decrypt file {}: {}'.format(server_filename, e))
storage.set_object_decryption_status(file_uuid, self.session, db.File, False)
self.set_status("Failed to download and decrypt file, "
"please try again.")
self.set_status("Failed to decrypt file, "
"please try again or talk to your administrator.")
# TODO: We should save the downloaded content, and just
# try to decrypt again if there was a failure.
return # If we failed we should stop here.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ def test_Client_on_file_downloaded_decrypt_failure(homedir, config, mocker):
cl.on_file_downloaded(result_data, current_object=submission_db_object)
mock_gpg.call_count == 1
cl.set_status.assert_called_once_with(
"Failed to download and decrypt file, please try again.")
"Failed to decrypt file, please try again or talk to your administrator.")
mock_storage.set_object_decryption_status.assert_called_once_with(
submission_db_object.uuid, mock_session, db.File, False)

Expand Down

4 comments on commit 0154854

@ninavizz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eloquence Stuff like this is part of why I'd like there to be a weekly Client meeting. Not sure if this was discussed in a Standup I missed, but this is important messaging content to have on my radar and a use-case to I'll need to consider as a state to design for with Files in the Client's UI.

@ninavizz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...alternately, I'd love to be able to attend existing dev meetings where stuff like this is getting discussed. It's been my experience to be a positive thing for UX folks to attend such meetings; I usually multi-task design stuff during the 90%-time when things aren't relevant to to me, fwiw... but it's terrific to be present when things that are relevant, do come up. Especially with a team so new to having a UX resource. :)

@redshiftzero
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry - this wasn't discussed in any meeting, this was a change that I made on Thursday or Friday. Happy to discuss further though - perhaps after standup?

@ninavizz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ayy, no biggie! On an aside, apologies for speaking past you in my note to Erik, Jen—and had thoughts last night after posting, that it likely came off as kinda rude to you.

Allie and I and Erik had all been separately discussing "hey, we should come together as a team more often!" to discuss Client things, in the past few weeks. Siked you and Allie have the full week in SF together for Client work & on-sites, and hopefully we'll all come together a bit more this week, as a start! :)

Please sign in to comment.