Merge lp:~wgrant/launchpad/hide-deleted-ppas into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 16504
Proposed branch: lp:~wgrant/launchpad/hide-deleted-ppas
Merge into: lp:launchpad
Diff against target: 50 lines (+17/-1)
3 files modified
lib/lp/registry/interfaces/person.py (+1/-1)
lib/lp/registry/model/person.py (+2/-0)
lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt (+14/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/hide-deleted-ppas
Reviewer Review Type Date Requested Status
Steve Kowalik (community) code Approve
Review via email: mp+149737@code.launchpad.net

Commit message

Hide deleted PPAs from Person:+index.

Description of the change

Hide deleted PPAs from Person:+index. Pretty simple.

To post a comment you must log in.
Revision history for this message
Steve Kowalik (stevenk) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/registry/interfaces/person.py'
--- lib/lp/registry/interfaces/person.py 2012-12-10 20:49:43 +0000
+++ lib/lp/registry/interfaces/person.py 2013-02-21 02:06:21 +0000
@@ -1052,7 +1052,7 @@
1052 """1052 """
10531053
1054 def getVisiblePPAs(user):1054 def getVisiblePPAs(user):
1055 """Return the PPAs for which user has launchpad.View permission."""1055 """Return active PPAs for which user has launchpad.View permission."""
10561056
1057 def getInvitedMemberships():1057 def getInvitedMemberships():
1058 """Return all TeamMemberships of this team with the INVITED status.1058 """Return all TeamMemberships of this team with the INVITED status.
10591059
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py 2013-01-22 05:59:13 +0000
+++ lib/lp/registry/model/person.py 2013-02-21 02:06:21 +0000
@@ -3076,6 +3076,8 @@
3076 return Store.of(self).find(3076 return Store.of(self).find(
3077 Archive,3077 Archive,
3078 Archive.owner == self,3078 Archive.owner == self,
3079 Archive.status.is_in(
3080 (ArchiveStatus.ACTIVE, ArchiveStatus.DELETING)),
3079 filter).order_by(Archive.name)3081 filter).order_by(Archive.name)
30803082
3081 def getPPAByName(self, name):3083 def getPPAByName(self, name):
30823084
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt 2013-02-20 04:02:00 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt 2013-02-21 02:06:21 +0000
@@ -694,6 +694,20 @@
694 ...694 ...
695 Unauthorized: ...695 Unauthorized: ...
696696
697Deleted PPAs don't even show up for the owner.
698
699 >>> from lp.soyuz.enums import ArchiveStatus
700 >>> login('admin@canonical.com')
701 >>> cprov = getUtility(IPersonSet).getByName('cprov')
702 >>> cprov.getPPAByName('edge').status = ArchiveStatus.DELETED
703 >>> logout()
704
705 >>> cprov_browser.open("http://launchpad.dev/~cprov")
706 >>> print_tag_with_id(cprov_browser.contents, 'ppas')
707 Personal package archives
708 PPA for Celso Providelo
709 Create a new PPA
710
697711
698Enabling or disabling of PPAs by the owner712Enabling or disabling of PPAs by the owner
699------------------------------------------713------------------------------------------