Merge lp:~michael.nelson/launchpad/509370-access-non-unique-ppa-name into lp:launchpad
- 509370-access-non-unique-ppa-name
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Michael Nelson |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~michael.nelson/launchpad/509370-access-non-unique-ppa-name |
Merge into: | lp:launchpad |
Diff against target: |
382 lines (+90/-54) 12 files modified
lib/canonical/launchpad/doc/tales.txt (+17/-2) lib/canonical/launchpad/emailtemplates/ppa-subscription-new.txt (+3/-1) lib/canonical/launchpad/mailnotification.py (+9/-3) lib/canonical/launchpad/webapp/tales.py (+27/-1) lib/lp/soyuz/browser/archive.py (+0/-11) lib/lp/soyuz/browser/tests/archive-views.txt (+1/-13) lib/lp/soyuz/doc/archivesubscriber.txt (+4/-1) lib/lp/soyuz/stories/ppa/xx-private-ppa-subscription-stories.txt (+11/-11) lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt (+3/-3) lib/lp/soyuz/templates/archive-index.pt (+2/-2) lib/lp/soyuz/templates/person-archive-subscription.pt (+2/-3) lib/lp/soyuz/templates/person-archive-subscriptions.pt (+11/-3) |
To merge this branch: | bzr merge lp:~michael.nelson/launchpad/509370-access-non-unique-ppa-name |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Curtis Hovey (community) | ui | Approve | |
Matthew Revell (community) | archivesubscriber.txt | Approve | |
Review via email: mp+19022@code.launchpad.net |
Commit message
Ensures that email sent regarding private ppa subscriptions uniquely identifies the ppa by including the ppa ref (ppa:cprov/myppa), and additionally the description (to help the person receiving the email to understand what the purpose of the PPA is.
Description of the change
Michael Nelson (michael.nelson) wrote : | # |
Matthew Revell (matthew.revell) wrote : | # |
> Matt: can you check the wording change to the email template? You can see the
> change in expected output in doc/archivesubs
Looks good to me. +1
As an aside, should we link to some help in the email?
Curtis Hovey (sinzui) wrote : | # |
Hi Michael.
This looks nice. I have a few remarks about the reset password button.
1) It should be in title case: [Reset Password]
2) Why is it missing padding between the text and the border in webkit?
I see a very narrow button in Epiphany, looks fine in Firefox.
Abel Deuring (adeuring) : | # |
Michael Nelson (michael.nelson) wrote : | # |
> Hi Michael.
>
> This looks nice. I have a few remarks about the reset password button.
> 1) It should be in title case: [Reset Password]
Thanks Curtis, I updated this one.
> 2) Why is it missing padding between the text and the border in webkit?
> I see a very narrow button in Epiphany, looks fine in Firefox.
Chromium is fine, but yeah, I installed Epiphany and took a look. Eek.
So we've got a button {padding:0} in our style.css.
Take a look at:
http://
Both images are chromium, the first with the default 0 padding, the second with 8px padding on the button. As you can see, Chromium (and FF, etc.) even with zero padding, the content of the button (text in this case) has its own padding or margin, whereas epiphany doesn't. I couldn't find a quick solution (modifying the button padding obviously affects the other browsers), so I've switched the button, replacing it with a hidden input (for the value passed to the view) and a normal <input type="submit"..> for the button. This ensures that Epiphany appears just like Chromium/FF now.
Curtis Hovey (sinzui) wrote : | # |
On Fri, 2010-02-12 at 12:43 +0000, Michael Nelson wrote:
> > Hi Michael.
...
> Take a look at:
> http://
>
> Both images are chromium, the first with the default 0 padding, the
> second with 8px padding on the button. As you can see, Chromium (and
> FF, etc.) even with zero padding, the content of the button (text in
> this case) has its own padding or margin, whereas epiphany doesn't. I
> couldn't find a quick solution (modifying the button padding obviously
> affects the other browsers), so I've switched the button, replacing it
> with a hidden input (for the value passed to the view) and a normal
> <input type="submit"..> for the button. This ensures that Epiphany
> appears just like Chromium/FF now.
>
> Thanks.
> http://
Your solution explains other bug reports if have seen about narrow
buttons, such as in the help pane.
I see that webkit has a plethora of styles, and I suspect the wrong one
is chosen by default. I only recently discovered that MacOS supports
extra narrow buttons and scrollbars:
-webkit-
May investigate this if I do another round of webkitisms.
--
__Curtis C. Hovey_________
http://
Preview Diff
1 | === modified file 'lib/canonical/launchpad/doc/tales.txt' | |||
2 | --- lib/canonical/launchpad/doc/tales.txt 2010-01-14 12:09:34 +0000 | |||
3 | +++ lib/canonical/launchpad/doc/tales.txt 2010-02-12 13:51:23 +0000 | |||
4 | @@ -123,11 +123,14 @@ | |||
5 | 123 | <img ... src="/@@/distribution" /> | 123 | <img ... src="/@@/distribution" /> |
6 | 124 | 124 | ||
7 | 125 | PPAs have a 'link' formatter, which returns the appropriate HTML used | 125 | PPAs have a 'link' formatter, which returns the appropriate HTML used |
9 | 126 | for referring to them in other pages. | 126 | for referring to them in other pages and a 'reference' formatter which |
10 | 127 | displays the unique ppa reference. | ||
11 | 127 | 128 | ||
12 | 128 | >>> print test_tales("ppa/fmt:link", ppa=mark.archive) | 129 | >>> print test_tales("ppa/fmt:link", ppa=mark.archive) |
13 | 129 | <a href="/~mark/+archive/ppa" | 130 | <a href="/~mark/+archive/ppa" |
14 | 130 | class="sprite ppa-icon">PPA for Mark Shuttleworth</a> | 131 | class="sprite ppa-icon">PPA for Mark Shuttleworth</a> |
15 | 132 | >>> print test_tales("ppa/fmt:reference", ppa=mark.archive) | ||
16 | 133 | ppa:mark/ppa | ||
17 | 131 | 134 | ||
18 | 132 | Disabled PPAs links use a different icon and are only linkified for | 135 | Disabled PPAs links use a different icon and are only linkified for |
19 | 133 | users with launchpad.View on them. | 136 | users with launchpad.View on them. |
20 | @@ -160,10 +163,22 @@ | |||
21 | 160 | 163 | ||
22 | 161 | >>> print test_tales("ppa/fmt:link", ppa=mark.archive) | 164 | >>> print test_tales("ppa/fmt:link", ppa=mark.archive) |
23 | 162 | 165 | ||
24 | 166 | Similarly, references to private PPAs are not rendered unless the user has | ||
25 | 167 | a subscription to the PPA. | ||
26 | 168 | |||
27 | 169 | >>> login('foo.bar@canonical.com') | ||
28 | 170 | >>> print test_tales("ppa/fmt:reference", ppa=mark.archive) | ||
29 | 171 | |||
30 | 172 | >>> login('mark@example.com') | ||
31 | 173 | >>> foo = getUtility(IPersonSet).getByName('name16') | ||
32 | 174 | >>> ignore = mark.archive.newSubscription(foo, mark) | ||
33 | 175 | >>> login('foo.bar@canonical.com') | ||
34 | 176 | >>> print test_tales("ppa/fmt:reference", ppa=mark.archive) | ||
35 | 177 | ppa:mark/ppa | ||
36 | 178 | |||
37 | 163 | We also have icons for builds which may have different dimensions. | 179 | We also have icons for builds which may have different dimensions. |
38 | 164 | 180 | ||
39 | 165 | >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher | 181 | >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher |
40 | 166 | >>> login('foo.bar@canonical.com') | ||
41 | 167 | >>> stp = SoyuzTestPublisher() | 182 | >>> stp = SoyuzTestPublisher() |
42 | 168 | >>> stp.prepareBreezyAutotest() | 183 | >>> stp.prepareBreezyAutotest() |
43 | 169 | >>> source = stp.getPubSource() | 184 | >>> source = stp.getPubSource() |
44 | 170 | 185 | ||
45 | === modified file 'lib/canonical/launchpad/emailtemplates/ppa-subscription-new.txt' | |||
46 | --- lib/canonical/launchpad/emailtemplates/ppa-subscription-new.txt 2009-07-13 09:22:52 +0000 | |||
47 | +++ lib/canonical/launchpad/emailtemplates/ppa-subscription-new.txt 2010-02-12 13:51:23 +0000 | |||
48 | @@ -3,7 +3,9 @@ | |||
49 | 3 | Launchpad: access to a private archive | 3 | Launchpad: access to a private archive |
50 | 4 | -------------------------------------- | 4 | -------------------------------------- |
51 | 5 | 5 | ||
53 | 6 | %(registrant_name)s has granted you access to a private software archive "%(ppa_name)s", which is hosted by Launchpad. | 6 | %(registrant_name)s has granted you access to a private software archive "%(ppa_displayname)s" (%(ppa_reference)s), which is hosted by Launchpad and has the following description: |
54 | 7 | |||
55 | 8 | %(ppa_description)s | ||
56 | 7 | 9 | ||
57 | 8 | To start downloading and using software from this archive you need to view your access details by visiting this link: | 10 | To start downloading and using software from this archive you need to view your access details by visiting this link: |
58 | 9 | 11 | ||
59 | 10 | 12 | ||
60 | === modified file 'lib/canonical/launchpad/mailnotification.py' | |||
61 | --- lib/canonical/launchpad/mailnotification.py 2010-01-14 17:53:22 +0000 | |||
62 | +++ lib/canonical/launchpad/mailnotification.py 2010-02-12 13:51:23 +0000 | |||
63 | @@ -1203,9 +1203,13 @@ | |||
64 | 1203 | """Notification that a new PPA subscription can be activated.""" | 1203 | """Notification that a new PPA subscription can be activated.""" |
65 | 1204 | non_active_subscribers = subscription.getNonActiveSubscribers() | 1204 | non_active_subscribers = subscription.getNonActiveSubscribers() |
66 | 1205 | 1205 | ||
67 | 1206 | archive = subscription.archive | ||
68 | 1206 | registrant_name = subscription.registrant.displayname | 1207 | registrant_name = subscription.registrant.displayname |
71 | 1207 | ppa_name = subscription.archive.displayname | 1208 | ppa_displayname = archive.displayname |
72 | 1208 | subject = 'PPA access granted for ' + ppa_name | 1209 | ppa_reference = "ppa:%s/%s" % ( |
73 | 1210 | archive.owner.name, archive.name) | ||
74 | 1211 | ppa_description = archive.description | ||
75 | 1212 | subject = 'PPA access granted for ' + ppa_displayname | ||
76 | 1209 | 1213 | ||
77 | 1210 | template = get_email_template('ppa-subscription-new.txt') | 1214 | template = get_email_template('ppa-subscription-new.txt') |
78 | 1211 | 1215 | ||
79 | @@ -1222,7 +1226,9 @@ | |||
80 | 1222 | 'recipient_name': person.displayname, | 1226 | 'recipient_name': person.displayname, |
81 | 1223 | 'registrant_name': registrant_name, | 1227 | 'registrant_name': registrant_name, |
82 | 1224 | 'registrant_profile_url': canonical_url(subscription.registrant), | 1228 | 'registrant_profile_url': canonical_url(subscription.registrant), |
84 | 1225 | 'ppa_name': ppa_name, | 1229 | 'ppa_displayname': ppa_displayname, |
85 | 1230 | 'ppa_reference': ppa_reference, | ||
86 | 1231 | 'ppa_description': ppa_description, | ||
87 | 1226 | 'recipient_subscriptions_url': recipient_subscriptions_url, | 1232 | 'recipient_subscriptions_url': recipient_subscriptions_url, |
88 | 1227 | } | 1233 | } |
89 | 1228 | body = MailWrapper(72).format(template % replacements, | 1234 | body = MailWrapper(72).format(template % replacements, |
90 | 1229 | 1235 | ||
91 | === modified file 'lib/canonical/launchpad/webapp/tales.py' | |||
92 | --- lib/canonical/launchpad/webapp/tales.py 2010-01-25 14:50:42 +0000 | |||
93 | +++ lib/canonical/launchpad/webapp/tales.py 2010-02-12 13:51:23 +0000 | |||
94 | @@ -45,6 +45,7 @@ | |||
95 | 45 | from lp.blueprints.interfaces.specification import ISpecification | 45 | from lp.blueprints.interfaces.specification import ISpecification |
96 | 46 | from lp.code.interfaces.branch import IBranch | 46 | from lp.code.interfaces.branch import IBranch |
97 | 47 | from lp.soyuz.interfaces.archive import ArchivePurpose, IPPA | 47 | from lp.soyuz.interfaces.archive import ArchivePurpose, IPPA |
98 | 48 | from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet | ||
99 | 48 | from canonical.launchpad.interfaces.launchpad import ( | 49 | from canonical.launchpad.interfaces.launchpad import ( |
100 | 49 | IHasIcon, IHasLogo, IHasMugshot, IPrivacy) | 50 | IHasIcon, IHasLogo, IHasMugshot, IPrivacy) |
101 | 50 | from lp.registry.interfaces.person import IPerson, IPersonSet | 51 | from lp.registry.interfaces.person import IPerson, IPersonSet |
102 | @@ -1589,6 +1590,13 @@ | |||
103 | 1589 | 1590 | ||
104 | 1590 | _link_summary_template = '%(display_name)s' | 1591 | _link_summary_template = '%(display_name)s' |
105 | 1591 | _link_permission = 'launchpad.View' | 1592 | _link_permission = 'launchpad.View' |
106 | 1593 | _reference_template = "ppa:%(owner_name)s/%(ppa_name)s" | ||
107 | 1594 | |||
108 | 1595 | final_traversable_names = { | ||
109 | 1596 | 'reference': 'reference', | ||
110 | 1597 | } | ||
111 | 1598 | final_traversable_names.update( | ||
112 | 1599 | CustomizableFormatter.final_traversable_names) | ||
113 | 1592 | 1600 | ||
114 | 1593 | def _link_summary_values(self): | 1601 | def _link_summary_values(self): |
115 | 1594 | """See CustomizableFormatter._link_summary_values.""" | 1602 | """See CustomizableFormatter._link_summary_values.""" |
116 | @@ -1618,6 +1626,24 @@ | |||
117 | 1618 | else: | 1626 | else: |
118 | 1619 | return '' | 1627 | return '' |
119 | 1620 | 1628 | ||
120 | 1629 | def reference(self, view_name=None, rootsite=None): | ||
121 | 1630 | """Return the text PPA reference for a PPA.""" | ||
122 | 1631 | # XXX: noodles 2010-02-11 bug=336779: This following check | ||
123 | 1632 | # should be replaced with the normal check_permission once | ||
124 | 1633 | # permissions for archive subscribers has been resolved. | ||
125 | 1634 | if self._context.private: | ||
126 | 1635 | request = get_current_browser_request() | ||
127 | 1636 | person = IPerson(request.principal) | ||
128 | 1637 | subscriptions = getUtility(IArchiveSubscriberSet).getBySubscriber( | ||
129 | 1638 | person, self._context) | ||
130 | 1639 | if subscriptions.is_empty(): | ||
131 | 1640 | return '' | ||
132 | 1641 | |||
133 | 1642 | return self._reference_template % { | ||
134 | 1643 | 'owner_name': self._context.owner.name, | ||
135 | 1644 | 'ppa_name': self._context.name, | ||
136 | 1645 | } | ||
137 | 1646 | |||
138 | 1621 | 1647 | ||
139 | 1622 | class SpecificationBranchFormatterAPI(CustomizableFormatter): | 1648 | class SpecificationBranchFormatterAPI(CustomizableFormatter): |
140 | 1623 | """Adapter for ISpecificationBranch objects to a formatted string.""" | 1649 | """Adapter for ISpecificationBranch objects to a formatted string.""" |
141 | @@ -3112,7 +3138,7 @@ | |||
142 | 3112 | 3138 | ||
143 | 3113 | traversable_names = { | 3139 | traversable_names = { |
144 | 3114 | 'link': 'link', | 3140 | 'link': 'link', |
146 | 3115 | 'url': 'url', | 3141 | 'url': 'url', |
147 | 3116 | 'displayname': 'displayname', | 3142 | 'displayname': 'displayname', |
148 | 3117 | } | 3143 | } |
149 | 3118 | 3144 | ||
150 | 3119 | 3145 | ||
151 | === modified file 'lib/lp/soyuz/browser/archive.py' | |||
152 | --- lib/lp/soyuz/browser/archive.py 2010-02-02 21:28:50 +0000 | |||
153 | +++ lib/lp/soyuz/browser/archive.py 2010-02-12 13:51:23 +0000 | |||
154 | @@ -561,17 +561,6 @@ | |||
155 | 561 | can_edit = check_permission('launchpad.Edit', self.context) | 561 | can_edit = check_permission('launchpad.Edit', self.context) |
156 | 562 | return can_edit and len(disabled_dependencies) > 0 | 562 | return can_edit and len(disabled_dependencies) > 0 |
157 | 563 | 563 | ||
158 | 564 | @property | ||
159 | 565 | def ppa_reference(self): | ||
160 | 566 | """PPA reference as supported by `dput` and `software-properties`. | ||
161 | 567 | |||
162 | 568 | :raises AssertionError: if the context `IArchive` is not a PPA. | ||
163 | 569 | :return: a `str` as 'ppa:%(ppa.owner.name)/%(ppa.name)' | ||
164 | 570 | """ | ||
165 | 571 | assert self.context.is_ppa, ( | ||
166 | 572 | 'PPA reference should not be used for non-PPA archives.') | ||
167 | 573 | return 'ppa:%s/%s' % (self.context.owner.name, self.context.name) | ||
168 | 574 | |||
169 | 575 | @cachedproperty | 564 | @cachedproperty |
170 | 576 | def package_copy_requests(self): | 565 | def package_copy_requests(self): |
171 | 577 | """Return any package copy requests associated with this archive.""" | 566 | """Return any package copy requests associated with this archive.""" |
172 | 578 | 567 | ||
173 | === modified file 'lib/lp/soyuz/browser/tests/archive-views.txt' | |||
174 | --- lib/lp/soyuz/browser/tests/archive-views.txt 2010-02-02 21:28:50 +0000 | |||
175 | +++ lib/lp/soyuz/browser/tests/archive-views.txt 2010-02-12 13:51:23 +0000 | |||
176 | @@ -46,18 +46,6 @@ | |||
177 | 46 | >>> print copy_archive_view.archive_label | 46 | >>> print copy_archive_view.archive_label |
178 | 47 | Archive | 47 | Archive |
179 | 48 | 48 | ||
180 | 49 | There is also the 'ppa_reference' property, which mimics the syntax | ||
181 | 50 | supported by `dput` and `software-properties` Ubuntu tools. | ||
182 | 51 | |||
183 | 52 | >>> print ppa_archive_view.ppa_reference | ||
184 | 53 | ppa:cprov/ppa | ||
185 | 54 | |||
186 | 55 | >>> print copy_archive_view.ppa_reference | ||
187 | 56 | Traceback (most recent call last): | ||
188 | 57 | ... | ||
189 | 58 | AssertionError: PPA reference should not be used for non-PPA | ||
190 | 59 | archives. | ||
191 | 60 | |||
192 | 61 | The ArchiveView is provides the html for the inline description | 49 | The ArchiveView is provides the html for the inline description |
193 | 62 | editing widget. | 50 | editing widget. |
194 | 63 | 51 | ||
195 | @@ -492,7 +480,7 @@ | |||
196 | 492 | Packages in ...PPA for Celso Providelo... | 480 | Packages in ...PPA for Celso Providelo... |
197 | 493 | 481 | ||
198 | 494 | >>> print copy_archive_view.page_title | 482 | >>> print copy_archive_view.page_title |
200 | 495 | Packages in ...Copy archive intrepid-security-rebuild... | 483 | Packages in ...Copy archive intrepid-security-rebuild... |
201 | 496 | 484 | ||
202 | 497 | This view inherits from ArchiveViewBase and has all the | 485 | This view inherits from ArchiveViewBase and has all the |
203 | 498 | corresponding properties such as archive_url, build_counters etc. | 486 | corresponding properties such as archive_url, build_counters etc. |
204 | 499 | 487 | ||
205 | === modified file 'lib/lp/soyuz/doc/archivesubscriber.txt' | |||
206 | --- lib/lp/soyuz/doc/archivesubscriber.txt 2009-12-24 01:41:54 +0000 | |||
207 | +++ lib/lp/soyuz/doc/archivesubscriber.txt 2010-02-12 13:51:23 +0000 | |||
208 | @@ -116,7 +116,10 @@ | |||
209 | 116 | -------------------------------------- | 116 | -------------------------------------- |
210 | 117 | <BLANKLINE> | 117 | <BLANKLINE> |
211 | 118 | Celso Providelo has granted you access to a private software archive | 118 | Celso Providelo has granted you access to a private software archive |
213 | 119 | "PPA for Celso Providelo", which is hosted by Launchpad. | 119 | "PPA for Celso Providelo" (ppa:cprov/ppa), which is hosted by Launchpad |
214 | 120 | and has the following description: | ||
215 | 121 | <BLANKLINE> | ||
216 | 122 | packages to help my friends. | ||
217 | 120 | <BLANKLINE> | 123 | <BLANKLINE> |
218 | 121 | To start downloading and using software from this archive you need to | 124 | To start downloading and using software from this archive you need to |
219 | 122 | view your access details by visiting this link: | 125 | view your access details by visiting this link: |
220 | 123 | 126 | ||
221 | === modified file 'lib/lp/soyuz/stories/ppa/xx-private-ppa-subscription-stories.txt' | |||
222 | --- lib/lp/soyuz/stories/ppa/xx-private-ppa-subscription-stories.txt 2009-12-24 01:41:54 +0000 | |||
223 | +++ lib/lp/soyuz/stories/ppa/xx-private-ppa-subscription-stories.txt 2010-02-12 13:51:23 +0000 | |||
224 | @@ -197,8 +197,8 @@ | |||
225 | 197 | >>> joe_browser.open("http://launchpad.dev/~joesmith") | 197 | >>> joe_browser.open("http://launchpad.dev/~joesmith") |
226 | 198 | >>> joe_browser.getLink('View your private PPA subscriptions').click() | 198 | >>> joe_browser.getLink('View your private PPA subscriptions').click() |
227 | 199 | >>> print_subscriptions_for_person(joe_browser.contents) | 199 | >>> print_subscriptions_for_person(joe_browser.contents) |
230 | 200 | Archive | 200 | Archive Owner |
231 | 201 | PPA for Celso Providelo View | 201 | PPA for ... Celso Providelo View |
232 | 202 | 202 | ||
233 | 203 | When Joe clicks on the View button for Celso's PPA then the | 203 | When Joe clicks on the View button for Celso's PPA then the |
234 | 204 | details of the subscription are displayed with the newly created | 204 | details of the subscription are displayed with the newly created |
235 | @@ -223,8 +223,9 @@ | |||
236 | 223 | >>> joe_browser.open( | 223 | >>> joe_browser.open( |
237 | 224 | ... "http://launchpad.dev/~joesmith/+archivesubscriptions") | 224 | ... "http://launchpad.dev/~joesmith/+archivesubscriptions") |
238 | 225 | >>> print_subscriptions_for_person(joe_browser.contents) | 225 | >>> print_subscriptions_for_person(joe_browser.contents) |
241 | 226 | Archive | 226 | Archive Owner |
242 | 227 | PPA for Celso Providelo View | 227 | PPA for ... Celso Providelo View |
243 | 228 | |||
244 | 228 | >>> joe_browser.getLink('View').click() | 229 | >>> joe_browser.getLink('View').click() |
245 | 229 | >>> print(extract_text(joe_browser.contents)) | 230 | >>> print(extract_text(joe_browser.contents)) |
246 | 230 | Access to PPA for Celso Providelo... | 231 | Access to PPA for Celso Providelo... |
247 | @@ -244,13 +245,12 @@ | |||
248 | 244 | >>> print(extract_text(regeneration_info)) | 245 | >>> print(extract_text(regeneration_info)) |
249 | 245 | Reset password | 246 | Reset password |
250 | 246 | If you believe... | 247 | If you believe... |
251 | 247 | Reset password | ||
252 | 248 | Note: after ... | 248 | Note: after ... |
253 | 249 | 249 | ||
254 | 250 | When Joe clicks on the 'Generate new personal subscription' link then | 250 | When Joe clicks on the 'Generate new personal subscription' link then |
255 | 251 | the page is redisplayed with new sources.list entries and a notification. | 251 | the page is redisplayed with new sources.list entries and a notification. |
256 | 252 | 252 | ||
258 | 253 | >>> joe_browser.getControl(name='regenerate').click() | 253 | >>> joe_browser.getControl(name='regenerate_btn').click() |
259 | 254 | >>> for msg in get_feedback_messages(joe_browser.contents): | 254 | >>> for msg in get_feedback_messages(joe_browser.contents): |
260 | 255 | ... print msg | 255 | ... print msg |
261 | 256 | Launchpad has generated the new password you requested for your | 256 | Launchpad has generated the new password you requested for your |
262 | @@ -278,7 +278,7 @@ | |||
263 | 278 | >>> transaction.commit() | 278 | >>> transaction.commit() |
264 | 279 | >>> logout() | 279 | >>> logout() |
265 | 280 | 280 | ||
267 | 281 | When Mark, a member of the Launchpad team, visits his profile and clicks | 281 | When Mark, a member of the Launchpad team, visits his profile and clicks |
268 | 282 | 'View your private PPA subscriptions', then he'll see a list of his current | 282 | 'View your private PPA subscriptions', then he'll see a list of his current |
269 | 283 | subscriptions. | 283 | subscriptions. |
270 | 284 | 284 | ||
271 | @@ -288,8 +288,8 @@ | |||
272 | 288 | 288 | ||
273 | 289 | >>> mark_browser.getLink('View your private PPA subscriptions').click() | 289 | >>> mark_browser.getLink('View your private PPA subscriptions').click() |
274 | 290 | >>> print_subscriptions_for_person(mark_browser.contents) | 290 | >>> print_subscriptions_for_person(mark_browser.contents) |
277 | 291 | Archive | 291 | Archive Owner |
278 | 292 | PPA for Celso Providelo View | 292 | PPA for ... Celso Providelo View |
279 | 293 | 293 | ||
280 | 294 | When Mark clicks on the view button, then he is taken to the page for | 294 | When Mark clicks on the view button, then he is taken to the page for |
281 | 295 | his personal subscription for Celso's private PPA and the newly-created | 295 | his personal subscription for Celso's private PPA and the newly-created |
282 | @@ -314,8 +314,8 @@ | |||
283 | 314 | >>> mark_browser.open( | 314 | >>> mark_browser.open( |
284 | 315 | ... "http://launchpad.dev/~mark/+archivesubscriptions") | 315 | ... "http://launchpad.dev/~mark/+archivesubscriptions") |
285 | 316 | >>> print_subscriptions_for_person(mark_browser.contents) | 316 | >>> print_subscriptions_for_person(mark_browser.contents) |
288 | 317 | Archive | 317 | Archive Owner |
289 | 318 | PPA for Celso Providelo View | 318 | PPA for ... Celso Providelo View |
290 | 319 | 319 | ||
291 | 320 | >>> mark_browser.getLink('View').click() | 320 | >>> mark_browser.getLink('View').click() |
292 | 321 | >>> print(extract_text(mark_browser.contents)) | 321 | >>> print(extract_text(mark_browser.contents)) |
293 | 322 | 322 | ||
294 | === modified file 'lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt' | |||
295 | --- lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt 2009-09-30 14:15:39 +0000 | |||
296 | +++ lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt 2010-02-12 13:51:23 +0000 | |||
297 | @@ -138,9 +138,9 @@ | |||
298 | 138 | >>> for row in find_tags_by_class(joe_browser.contents, | 138 | >>> for row in find_tags_by_class(joe_browser.contents, |
299 | 139 | ... 'archive-subscription-row'): | 139 | ... 'archive-subscription-row'): |
300 | 140 | ... print extract_text(row) | 140 | ... print extract_text(row) |
304 | 141 | Archive | 141 | Archive Owner |
305 | 142 | PPA for Mark Shuttleworth View | 142 | PPA for Mark Shuttleworth (ppa:mark/ppa) Mark Shuttleworth View |
306 | 143 | PPA for Celso Providelo View | 143 | PPA for Celso Providelo (ppa:cprov/ppa) Celso Providelo View |
307 | 144 | 144 | ||
308 | 145 | == Confirming a subscription == | 145 | == Confirming a subscription == |
309 | 146 | 146 | ||
310 | 147 | 147 | ||
311 | === modified file 'lib/lp/soyuz/templates/archive-index.pt' | |||
312 | --- lib/lp/soyuz/templates/archive-index.pt 2010-02-10 14:19:23 +0000 | |||
313 | +++ lib/lp/soyuz/templates/archive-index.pt 2010-02-12 13:51:23 +0000 | |||
314 | @@ -84,7 +84,7 @@ | |||
315 | 84 | <p>You can update your system with unsupported packages from | 84 | <p>You can update your system with unsupported packages from |
316 | 85 | this untrusted PPA by <a href="/+help/soyuz/ppa-sources-list.html" | 85 | this untrusted PPA by <a href="/+help/soyuz/ppa-sources-list.html" |
317 | 86 | target="help">adding</a> <strong | 86 | target="help">adding</a> <strong |
319 | 87 | tal:content="view/ppa_reference">ppa:cprov/ppa</strong> | 87 | tal:content="context/fmt:reference">ppa:cprov/ppa</strong> |
320 | 88 | to your system's Software Sources. | 88 | to your system's Software Sources. |
321 | 89 | <span id="pre-karmic-systems-slide-trigger" | 89 | <span id="pre-karmic-systems-slide-trigger" |
322 | 90 | >Not using Ubuntu 9.10 (Karmic)?</span></p> | 90 | >Not using Ubuntu 9.10 (Karmic)?</span></p> |
323 | @@ -316,7 +316,7 @@ | |||
324 | 316 | spurious build failures or binaries with unexpected | 316 | spurious build failures or binaries with unexpected |
325 | 317 | contents.</p> | 317 | contents.</p> |
326 | 318 | <p>You can upload packages to this PPA using:</p> | 318 | <p>You can upload packages to this PPA using:</p> |
328 | 319 | <p><tt>dput <tal:ppa-ref replace="view/ppa_reference" | 319 | <p><tt>dput <tal:ppa-ref replace="context/fmt:reference" |
329 | 320 | >ppa:cprov/ppa</tal:ppa-ref> <source.changes></tt> | 320 | >ppa:cprov/ppa</tal:ppa-ref> <source.changes></tt> |
330 | 321 | (<a href="https://help.launchpad.net/Packaging/PPA/Uploading" | 321 | (<a href="https://help.launchpad.net/Packaging/PPA/Uploading" |
331 | 322 | >Read about uploading</a>)</p> | 322 | >Read about uploading</a>)</p> |
332 | 323 | 323 | ||
333 | === modified file 'lib/lp/soyuz/templates/person-archive-subscription.pt' | |||
334 | --- lib/lp/soyuz/templates/person-archive-subscription.pt 2009-09-14 08:44:08 +0000 | |||
335 | +++ lib/lp/soyuz/templates/person-archive-subscription.pt 2010-02-12 13:51:23 +0000 | |||
336 | @@ -55,9 +55,8 @@ | |||
337 | 55 | on this page. You'll need to update them on your computer. | 55 | on this page. You'll need to update them on your computer. |
338 | 56 | </p> | 56 | </p> |
339 | 57 | <form action="" method="post"> | 57 | <form action="" method="post"> |
343 | 58 | <button type="submit" name="regenerate" value="1"> | 58 | <input type="hidden" name="regenerate" value="1" /> |
344 | 59 | Reset password | 59 | <input type="submit" name="regenerate_btn" value="Reset Password" /> |
342 | 60 | </button> | ||
345 | 61 | </form> | 60 | </form> |
346 | 62 | <p class="discreet"> | 61 | <p class="discreet"> |
347 | 63 | Note: after resetting the password for your personal | 62 | Note: after resetting the password for your personal |
348 | 64 | 63 | ||
349 | === modified file 'lib/lp/soyuz/templates/person-archive-subscriptions.pt' | |||
350 | --- lib/lp/soyuz/templates/person-archive-subscriptions.pt 2009-11-02 21:44:55 +0000 | |||
351 | +++ lib/lp/soyuz/templates/person-archive-subscriptions.pt 2010-02-12 13:51:23 +0000 | |||
352 | @@ -16,10 +16,11 @@ | |||
353 | 16 | been granted access are listed below. | 16 | been granted access are listed below. |
354 | 17 | </p> | 17 | </p> |
355 | 18 | <table summary="CONTEXTS/fmt:pagetitle" id="archive-subscriptions" | 18 | <table summary="CONTEXTS/fmt:pagetitle" id="archive-subscriptions" |
357 | 19 | class="listing" style="width:70%"> | 19 | class="listing"> |
358 | 20 | <thead> | 20 | <thead> |
359 | 21 | <tr class="archive-subscription-row"> | 21 | <tr class="archive-subscription-row"> |
360 | 22 | <th>Archive</th> | 22 | <th>Archive</th> |
361 | 23 | <th>Owner</th> | ||
362 | 23 | <th></th> | 24 | <th></th> |
363 | 24 | </tr> | 25 | </tr> |
364 | 25 | </thead> | 26 | </thead> |
365 | @@ -29,8 +30,15 @@ | |||
366 | 29 | <tal:subscription_and_token | 30 | <tal:subscription_and_token |
367 | 30 | define="subscription subscription_with_token/subscription; | 31 | define="subscription subscription_with_token/subscription; |
368 | 31 | token subscription_with_token/token"> | 32 | token subscription_with_token/token"> |
371 | 32 | <td tal:content="subscription/archive/displayname" | 33 | <td class="ppa_display_name"> |
372 | 33 | class="ppa_display_name">Private PPA for Celso | 34 | <tal:display_name content="subscription/archive/displayname"> |
373 | 35 | Private PPA for Celso | ||
374 | 36 | </tal:display_name> | ||
375 | 37 | (<tal:reference content="subscription/archive/fmt:reference"> | ||
376 | 38 | ppa:cprov/ppa</tal:reference>) | ||
377 | 39 | </td> | ||
378 | 40 | <td><tal:owner content="structure subscription/archive/owner/fmt:link"> | ||
379 | 41 | Celso Providelo</tal:owner> | ||
380 | 34 | </td> | 42 | </td> |
381 | 35 | <td> | 43 | <td> |
382 | 36 | <tal:active condition="token"> | 44 | <tal:active condition="token"> |
This branch addresses the issues in bug 509370, by ensuring that when a person is added as a subscriber to a private PPA, the email they receive informing them will include not only the display name of the PPA, but also the ppa name, and the description of the PPA.
It also updates the archive subscriptions page to include the PPA name (in addition to the display name) and a link to the owner (but not currently the description of the PPA as it's not viewable by the subscriber, but this could be addressed by bug 336779).
Matt: can you check the wording change to the email template? You can see the change in expected output in doc/archivesubs criber. txt
An example of the archivesubscrip tions page: people. canonical. com/~michaeln/ tmp/Screenshot- Private% 20PPA%20access% 20:%20Joe% 20Smith% 20-%20Chromium. png
http://
== Demo ==
To setup the subscription, run the following in a harness:
http:// pastebin. ubuntu. com/373304/
and then login as <email address hidden>:test and browse toz;
https:/ /launchpad. dev/~joesmith
then click on "View your private PPA subscriptions"
== Test == ppa-subscriptio n -t archivesubscrib er.txt
bin/test -vv -t xx-private-
== Pylint notices ==
lib/canonical/ launchpad/ mailnotificatio n.py MIMEMultipart' (No module named MIMEMultipart)
15: [F0401] Unable to import 'email.Header' (No module named Header)
16: [F0401] Unable to import 'email.MIMEText' (No module named MIMEText)
17: [F0401] Unable to import 'email.
18: [F0401] Unable to import 'email.MIMEMessage' (No module named MIMEMessage)
19: [F0401] Unable to import 'email.Utils' (No module named Utils)