Merge lp:~wgrant/launchpad/git-mp-reviewer-fix into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | 18267 |
Proposed branch: | lp:~wgrant/launchpad/git-mp-reviewer-fix |
Merge into: | lp:launchpad |
Diff against target: |
155 lines (+58/-23) 3 files modified
lib/lp/app/security.py (+13/-2) lib/lp/code/tests/test_branchmergeproposal.py (+17/-0) lib/lp/security.py (+28/-21) |
To merge this branch: | bzr merge lp:~wgrant/launchpad/git-mp-reviewer-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Review via email: mp+310867@code.launchpad.net |
Commit message
Fix GitRepository.
Description of the change
Fix GitRepository.
The security adapter erroneously assumed that the target's
checkAuthenticated would return a bool, but GitRef uses a
DelegatedAuthor
delegate to. Since the iterator always evaluated non-zero, the reviewer
check was short-circuited, and the permission check returned negative
when the delegated check failed.
We probably want to move iter_authorizations down into BaseAuthorization at some point, but that entails passing the cache through, so I just added a minor safetynet for now.