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

hypothesis / h / 8243 / 1
66%
master: 97%

Build:
Build:
LAST BUILD BRANCH: realtime-update-v1-h-only-1
DEFAULT BRANCH: master
Ran 29 Sep 2015 05:09PM UTC
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

29 Sep 2015 05:01PM UTC coverage: 66.486%. First build
8243.1

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.

2327 of 3500 relevant lines covered (66.49%)

0.66 hits per line

Source Files on job 8243.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8243
  • Travis Job 8243.1
  • ed34c55c on github
  • Next Job for on 2555-fix-email-notifications (#8244.1)
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