Merge lp:~wgrant/launchpad/bug-576168-no-disabled-latest-ppas into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: Michael Nelson
Approved revision: no longer in the source branch.
Merged at revision: 10839
Proposed branch: lp:~wgrant/launchpad/bug-576168-no-disabled-latest-ppas
Merge into: lp:launchpad
Diff against target: 33 lines (+12/-0)
2 files modified
lib/lp/soyuz/doc/archive.txt (+11/-0)
lib/lp/soyuz/model/archive.py (+1/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/bug-576168-no-disabled-latest-ppas
Reviewer Review Type Date Requested Status
Michael Nelson (community) code Approve
Review via email: mp+24812@code.launchpad.net

Commit message

Don't display uploads to disabled PPAs in the latest upload list.

Description of the change

A trivial branch to exclude publications within disabled PPAs from the latest upload list. Since normal users can't see these PPAs, they can't see publications inside them, causing bug #576168.

There is no lint.

To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Thanks William. I'll send it off to land.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/soyuz/doc/archive.txt'
--- lib/lp/soyuz/doc/archive.txt 2010-04-29 23:06:26 +0000
+++ lib/lp/soyuz/doc/archive.txt 2010-05-06 10:41:29 +0000
@@ -1786,6 +1786,17 @@
1786 iceweasel 1.0 in breezy-autotest PUBLISHED mark1786 iceweasel 1.0 in breezy-autotest PUBLISHED mark
1787 pmount 0.1-1 in warty PUBLISHED cprov1787 pmount 0.1-1 in warty PUBLISHED cprov
17881788
1789Publications in disabled archives are also excluded, since normal users
1790can't see them.
1791
1792 >>> login("admin@canonical.com")
1793 >>> cprov_cdrkit.archive.disable()
1794 >>> print_latest_uploads()
1795 cdrkit 1.0 in hoary PENDING mark
1796 iceweasel 1.0 in hoary PENDING mark
1797 iceweasel 1.0 in breezy-autotest PUBLISHED mark
1798 >>> cprov_cdrkit.archive.enable()
1799
1789'getMostActivePPAsForDistribution' returns a list of dictionaries1800'getMostActivePPAsForDistribution' returns a list of dictionaries
1790containing up to 5 PPAs with the highest number of publications in the1801containing up to 5 PPAs with the highest number of publications in the
1791last 7 days. Each dictionary contains the following keys:1802last 7 days. Each dictionary contains the following keys:
17921803
=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py 2010-05-03 07:32:58 +0000
+++ lib/lp/soyuz/model/archive.py 2010-05-06 10:41:29 +0000
@@ -1681,6 +1681,7 @@
1681 SourcePackagePublishingHistory.distroseries =1681 SourcePackagePublishingHistory.distroseries =
1682 DistroSeries.id AND1682 DistroSeries.id AND
1683 Archive.private = FALSE AND1683 Archive.private = FALSE AND
1684 Archive.enabled = TRUE AND
1684 DistroSeries.distribution = %s AND1685 DistroSeries.distribution = %s AND
1685 Archive.purpose = %s1686 Archive.purpose = %s
1686 """ % sqlvalues(distribution, ArchivePurpose.PPA)1687 """ % sqlvalues(distribution, ArchivePurpose.PPA)