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

app: do not show drafts in preview #1002

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

redshiftzero
Copy link
Contributor

Description

Fixes #997. The previews should show activity from the server only (cc @ninavizz), that is successful replies, and activity from the source.

Test Plan

  1. Add to below this line in the server endpoint:
+            early_fail = random.choice([True, False])
+            if early_fail:
+                abort(404)
  1. Submit replies until one fails.
  2. Verify that the preview snippet does not contain the text of the failed reply.

Checklist

If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:

  • I have tested these changes in the appropriate Qubes environment
  • I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)
  • These changes should not need testing in Qubes

If these changes add or remove files other than client code, packaging logic (e.g., the AppArmor profile) may need to be updated. Please check as applicable:

  • I have submitted a separate PR to the packaging repo
  • No update to the packaging logic (e.g., AppArmor profile) is required for these changes
  • I don't know and would appreciate guidance

@redshiftzero redshiftzero force-pushed the 997-show-only-server-items-in-preview branch from 236d884 to 4249513 Compare March 25, 2020 23:35
Copy link
Contributor

@sssoleileraaa sssoleileraaa left a comment

Choose a reason for hiding this comment

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

lgtm, failed replies no longer show up in the preview. also tested that draft replies no longer show up there.

@@ -63,6 +63,18 @@ def collection(self) -> List:
datetime.datetime(datetime.MINYEAR, 1, 1))))
return collection

@property
def server_collection(self) -> List:
Copy link
Contributor

Choose a reason for hiding this comment

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

nice solution 👍

@sssoleileraaa sssoleileraaa merged commit a63eefa into master Mar 26, 2020
SecureDrop Team Board automation moved this from Ready for Review to Done Mar 26, 2020
@sssoleileraaa sssoleileraaa deleted the 997-show-only-server-items-in-preview branch March 26, 2020 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Failed Reply Shows As Preview
2 participants