Please expose an API method to know whether a person can upload a sourcepackagename to a series in an archive
Bug #503149 reported by
James Westby
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Jelmer Vernooij |
Bug Description
Hi,
I would really like an API call that could tell me whether LP would
accept an upload from a person to an archive of a particular source package
name (with an optional series parameter). I would want this to be what
LPs decision was if it was processing the upload at that time and all other
things were equal (signed, version checks, etc.)
This means that it should accept it whether their right comes from the component,
the package, or the packageset, and would do the right thing if the package was
NEW to that archive.
It's my understanding that such a method may be in LP now (rather than being
spread out in other methods), so it may just be a job of exporting it.
Thanks,
James
Related branches
lp://staging/~jelmer/launchpad/refactor-permissions
- Brad Crittenden (community): Approve (code)
-
Diff: 1138 lines (+356/-318)19 files modifiedlib/canonical/launchpad/security.py (+7/-8)
lib/lp/archiveuploader/nascentupload.py (+2/-3)
lib/lp/archiveuploader/permission.py (+0/-246)
lib/lp/archiveuploader/tests/nascentupload-packageset.txt (+2/-2)
lib/lp/archiveuploader/tests/test_permission.py (+12/-14)
lib/lp/bugs/model/bugnomination.py (+1/-1)
lib/lp/code/model/recipebuilder.py (+2/-3)
lib/lp/code/model/sourcepackagerecipe.py (+3/-4)
lib/lp/code/model/tests/test_sourcepackagerecipe.py (+2/-3)
lib/lp/code/tests/test_branch.py (+4/-5)
lib/lp/soyuz/browser/archive.py (+2/-1)
lib/lp/soyuz/doc/archive.txt (+11/-11)
lib/lp/soyuz/doc/archivepermission.txt (+1/-1)
lib/lp/soyuz/doc/nascentupload.txt (+2/-3)
lib/lp/soyuz/interfaces/archive.py (+136/-1)
lib/lp/soyuz/model/archive.py (+94/-5)
lib/lp/soyuz/model/archivepermission.py (+2/-2)
lib/lp/soyuz/model/binarypackagebuildbehavior.py (+2/-3)
lib/lp/soyuz/tests/test_archive.py (+71/-2)
lp://staging/~jelmer/launchpad/can-upload-webcall
- Michael Nelson (community): Approve
- Curtis Hovey (community): Approve (code and rc)
-
Diff: 137 lines (+72/-1)4 files modifiedlib/canonical/launchpad/interfaces/_schema_circular_imports.py (+4/-0)
lib/lp/soyuz/interfaces/archive.py (+26/-0)
lib/lp/soyuz/model/archive.py (+14/-0)
lib/lp/soyuz/stories/webservice/xx-archive.txt (+28/-1)
Changed in soyuz: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
status: | Triaged → In Progress |
Changed in soyuz: | |
milestone: | 10.02 → 10.03 |
Changed in soyuz: | |
milestone: | 10.03 → 10.04 |
Changed in soyuz: | |
milestone: | 10.04 → 10.05 |
tags: |
added: qa-ok removed: qa-needstesting |
tags: | removed: qa-ok |
Changed in soyuz: | |
status: | Fix Committed → Fix Released |
Changed in soyuz: | |
status: | Fix Released → Fix Committed |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in soyuz: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
If that level of functionality is desired then check_upload_ to_archive( ) (in lib/lp/ archiveuploader /permission. py|128| ) should be exposed. That's the function used for source package upload authorization checks (in lib/lp/ archiveuploader /nascentupload. py|491| ).
Please note that check_upload_ to_archive( ) is a plain function however, and, if memory serves right, only methods can be exposed on the LP API.