Merge lp:~bac/launchpad/bug-828914-test into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13842 |
Proposed branch: | lp:~bac/launchpad/bug-828914-test |
Merge into: | lp:launchpad |
Diff against target: |
211 lines (+58/-21) 4 files modified
lib/canonical/launchpad/security.py (+2/-1) lib/lp/buildmaster/model/packagebuild.py (+3/-1) lib/lp/code/browser/tests/test_sourcepackagerecipe.py (+11/-10) lib/lp/code/model/tests/test_sourcepackagerecipe.py (+42/-9) |
To merge this branch: | bzr merge lp:~bac/launchpad/bug-828914-test |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | code | Approve | |
Review via email: mp+73585@code.launchpad.net |
Commit message
[r=benji][bug=828914] Use the proper security adapter when building a SourcePackageRecipe into a private PPA and the user has ArchivePermission to upload but isn't a member of the team that owns the PPA.
Description of the change
= Summary =
When a user is not a member of the team owning a private PPA, but does
have upload rights via an ArchivePermission, tries to request a recipe
build there is an error in the security adapter which causes an OOPS.
The problem is the wrong security adapter is being used.
== Proposed fix ==
Use getAdapter to select the proper adapter.
== Pre-implementation notes ==
Talks with Julian, Aaron, and William.
== Tests ==
bin/test -vvt test_sourcepack
== Demo and Q/A ==
* Create a private PPA for a team you are a member.
* Using the API, create a new component uploader archive permission
for your user.
team = lp.people['team']
p3a = team.ppas[0]
p3a.newCompon
* Leave the team.
* Now create a recipe for one of your branches and use the private
team PPA as the build destination.
* Select 'Request build'.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/canonical
lib/lp/
lib/lp/
lib/lp/
Will fix these lint issues later.
./lib/lp/
647: local variable 'build' is assigned to but never used
1100: local variable 'build' is assigned to but never used
105: E251 no spaces around keyword / parameter equals
307: E225 missing whitespace around operator
313: E225 missing whitespace around operator
500: E225 missing whitespace around operator
642: E225 missing whitespace around operator
1072: E225 missing whitespace around operator
1092: E225 missing whitespace around operator
./lib/lp/
483: Line exceeds 78 characters.
1155: Line exceeds 78 characters.
483: E501 line too long (80 characters)
595: E225 missing whitespace around operator
1042: E225 missing whitespace around operator
Looks good.