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

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

Build:
Build:
LAST BUILD BRANCH: realtime-update-v1-h-only-1
DEFAULT BRANCH: master
Ran 29 Sep 2015 05:44PM UTC
Files 83
Run time 3s
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:36PM UTC coverage: 66.467% (-0.02%) from 66.486%
8251.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.

Fixes #2555.

2327 of 3501 relevant lines covered (66.47%)

0.66 hits per line

Source Files on job 8251.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8251
  • Travis Job 8251.1
  • 17294815 on github
  • Prev 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