Merge ~cjwatson/launchpad:webhook-team-owned-private-artifacts into launchpad:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Colin Watson | ||||
Approved revision: | 7e523fa160724e8e2c0e450cab3f376722a4d06a | ||||
Merge reported by: | Otto Co-Pilot | ||||
Merged at revision: | not available | ||||
Proposed branch: | ~cjwatson/launchpad:webhook-team-owned-private-artifacts | ||||
Merge into: | launchpad:master | ||||
Diff against target: |
108 lines (+16/-10) 3 files modified
lib/lp/services/webapp/authorization.py (+6/-1) lib/lp/services/webhooks/model.py (+2/-3) lib/lp/services/webhooks/tests/test_model.py (+8/-6) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | code | Approve | |
Review via email: mp+384899@code.launchpad.net |
Commit message
Fix webhooks for team-owned private targets
Description of the change
In order to cope with webhook targets that use DelegatedAuthor
However, iter_authorization only uses the principal to get hold of a corresponding IPersonRoles, and most security adapters work just fine on teams; so, to simplify all this and make it work in this case, we can just pass an IPersonRoles directly.