• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hypothesis / h / 8244
66%
master: 97%

Build:
Build:
LAST BUILD BRANCH: realtime-update-v1-h-only-1
DEFAULT BRANCH: master
Ran 29 Sep 2015 05:12PM UTC
Jobs 1
Files 83
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
8244

push

travis-ci

nickstenning
Check permissions correctly when sending reply notifications

When we receive an annotation in the notification mailer, we need to
perform a set of checks:

- to determine if the annotation is a reply
- to determine who the author of the thread parent is
- to determine if we should send a reply notification to that author

In particular, we only want to send a reply notification email if the
author is going to be able to read the reply. Previously, this was done
by checking if the principals allowed by the 'read' permission included
the system principal "system.Everyone".

Unfortunately, 998347a broke this by removing normal Annotation
instances' status as a pyramid "context object", meaning that no
annotations were passing the test and no reply notification emails were
being sent.

This commit updates that permissions check. Now we:

1. Compute the set of principals of the parent annotation's author,
   using `h.auth.effective_principals`.
2. Compute the set of principals that are allowed to 'read' the reply
   annotation.
3. Abort unless these two sets have a non-null intersection.

Fixes #2555.

2327 of 3500 relevant lines covered (66.49%)

0.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8244.1 29 Sep 2015 05:12PM UTC 0
66.49
Travis Job 8244.1
Source Files on build 8244
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #8244
  • 78fb02bb on github
  • Prev Build on 2555-fix-email-notifications (#8243)
  • Next Build on 2555-fix-email-notifications (#8251)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc