~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
Personal Home Pages
===================

Launchpad creates profiles for people that have contributed to free
software (e.g. in a bug import or a translation template upload). It's
clearly stated that those people don't use Launchpad and why there's a
profile for them.

    >>> browser.open('http://launchpad.dev/~matsubara')
    >>> browser.title
    'Diogo Matsubara does not use Launchpad'

    >>> content = find_main_content(browser.contents).find('p')
    >>> print extract_text(content)
    Diogo Matsubara does not use Launchpad. This page was created on
    2006-12-13 when importing the Portuguese...


Email address disclosure
------------------------

Mark has a registered email address, and he has chosen to disclose it to
the world. Anonymous users cannot see Mark's address

    >>> anon_browser.open('http://launchpad.dev/~mark')
    >>> print extract_text(
    ...     find_tag_by_id(anon_browser.contents, 'email-addresses'))
    Email: Log in for email information.

A logged in user such as Sample Person, can see Mark's addresses.

    >>> sample_browser = setupBrowser(auth='Basic test@canonical.com:test')
    >>> sample_browser.open('http://launchpad.dev/~mark')
    >>> print extract_text(
    ...     find_tag_by_id(sample_browser.contents, 'email-addresses'))
    Email: mark@example.com

As for Sample Person, he has chosen not to disclose his email addresses.
unprivileged users like No Privileges Person cannot see his addresses:

    >>> user_browser.open('http://launchpad.dev/~name12')
    >>> print extract_text(
    ...     find_tag_by_id(user_browser.contents, 'email-addresses'))
    Email: No public address provided.

But Foo Bar can:

    >>> admin_browser.open('http://launchpad.dev/~name12')
    >>> print extract_text(
    ...     find_tag_by_id(admin_browser.contents, 'email-addresses'))
    Email: Change e-mail settings
    test@canonical.com
    testing@canonical.com


Open ID link
------------

When a person visits his or her own page, they'll see their OpenID login
URL.

    >>> user_browser.open('http://launchpad.dev/~no-priv')
    >>> print extract_text(
    ...     find_tag_by_id(user_browser.contents, 'openid-info'))
    OpenID login:
    http://launchpad.dev/~no-priv...

The URL is followed by a helpful link.

    >>> print user_browser.getLink('OpenID help').url
    http://launchpad.dev/+help/openid.html

However, when the user visits someone else's page, they see no such URL.

    >>> user_browser.open('http://launchpad.dev/~salgado')
    >>> print find_tag_by_id(user_browser.contents, 'openid-info')
    None

And there is no helpful link.

    >>> print user_browser.getLink('openid help').url
    Traceback (most recent call last):
    ...
    LinkNotFoundError


Jabber IDs
----------

A person's jabber IDs are only show to authenticated users.

    >>> user_browser.open('http://launchpad.dev/~mark')
    >>> print extract_text(
    ...     find_tag_by_id(user_browser.contents, 'jabber-ids'))
    Jabber: markshuttleworth@jabber.org

    >>> anon_browser.open('http://launchpad.dev/~mark')
    >>> print extract_text(
    ...     find_tag_by_id(anon_browser.contents, 'jabber-ids'))
    Jabber: <email address hidden>


OpenPGP keys
------------

In order to avoid email harvesters to find a person's email addresses
just by following the link to that person's OpenPGP keys, only
authenticated users can see the key ID with a link to the keyserver.

    >>> user_browser.open('http://launchpad.dev/~name16')
    >>> print find_tag_by_id(user_browser.contents, 'pgp-keys')
    <dl...
    <a href="http://keyserver...

    >>> anon_browser.open('http://launchpad.dev/~name16')
    >>> print find_tag_by_id(anon_browser.contents, 'pgp-keys')
    <dl...
    <dd> 12345678...


Languages
---------

The contact details portlet shows the languages that the user speaks. No
Privileges Person can see the languages that mark speaks.

    >>> user_browser.open('http://launchpad.dev/~carlos')
    >>> print extract_text(find_tag_by_id(user_browser.contents, 'languages'))
    Languages:
    Catalan, English, Spanish

When viewing his own page, No Privileges Person sees his languages and
can edit them.

    >>> user_browser.open('http://launchpad.dev/~no-priv')
    >>> print extract_text(find_tag_by_id(user_browser.contents, 'languages'))
    Languages: Set preferred languages
    English


Summary Pagelets
----------------

A person's homepage also lists Karma information:

    >>> browser.open('http://launchpad.dev/~mark')
    >>> print extract_text(find_tag_by_id(browser.contents, 'karma'))
    Karma: 130 Karma help

Negative Ubuntu Code of Conduct signatory status is only displayed for
yourself; others won't see it:

    >>> print find_tag_by_id(browser.contents, 'ubuntu-coc')
    None

    >>> browser = setupBrowser(auth='Basic mark@example.com:test')
    >>> browser.open('http://launchpad.dev/~mark')
    >>> print extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc'))
    Signed Ubuntu Code of Conduct: No

You can grab certain bits of information programatically:

    >>> print extract_text(find_tag_by_id(browser.contents, 'karma-total'))
    130

    >>> print extract_text(find_tag_by_id(browser.contents, 'member-since'))
    2005-06-06

Teams don't have member-since; they have created-date:

    >>> browser.open('http://launchpad.dev/~guadamen')
    >>> print extract_text(find_tag_by_id(browser.contents, 'created-date'))
    2005-06-06


Time zones
..........

The user's time zone is displayed next to their location details:

    >>> browser.open('http://launchpad.dev/~kamion')
    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'portlet-map'))
    Location
    Time zone: Europe/London...

If the user does not have location data set then the portlet will not be
shown.

    >>> browser.open('http://launchpad.dev/~bac')
    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'portlet-map'))


Table of contributions
----------------------

A person's home page also displays a table with the contributions made
by that person. This table includes 5 projects in which this person is
most active and also the areas in which (s)he worked on each project.

    >>> anon_browser.open('http://launchpad.dev/~name16')
    >>> table = find_tag_by_id(anon_browser.contents, 'contributions')
    >>> for tr in table.findAll('tr'):
    ...     print tr.find('th').find('a').renderContents()
    ...     for td in tr.findAll('td'):
    ...         img = td.find('img')
    ...         if img is not None:
    ...             print "\t", img['title']
    Evolution
       Bug Management
       Translations in Rosetta
    Ubuntu
       Bug Management
    gnomebaker
       Bug Management
    Mozilla Thunderbird
       Bug Management
    Mozilla Firefox
       Bug Management

The portlet also has a link to see the most recent karmic activity.

    >>> anon_browser.getLink('Recent activities')
    <Link text='Recent activities' url='http://launchpad.dev/~name16/+karma'>

If the person hasn't made any contributions, the table is not present in
its page.

    >>> anon_browser.open('http://launchpad.dev/~jdub')
    >>> print find_tag_by_id(anon_browser.contents, 'contributions')
    None

The same for teams.

    >>> anon_browser.open('http://launchpad.dev/~ubuntu-team')
    >>> print find_tag_by_id(anon_browser.contents, 'contributions')
    None


Unactivated profiles
--------------------

Many profiles are created for users who contributed to projects that
were imported into Launchpad. Any user can see an unclaimed profile and
a link to request a claim the profile.

    >>> anon_browser.open('https://launchpad.dev/~jvprat')
    >>> print anon_browser.title
    Jordi Vilalta does not use Launchpad

    >>> print extract_text(find_main_content(anon_browser.contents))
    Jordi Vilalta does not use Launchpad. This page was created on ...
    when importing the Catalan (ca) translation of pmount in Ubuntu Hoary...

    >>> anon_browser.getLink('Are you Jordi Vilalta')
    <Link text='Are you Jordi Vilalta?' url='.../people/+requestmerge...'>

It is possible for the preferred email address to be set if it is
associated with an Ubuntu Single Signon account. Anonymous and logged in
users cannot see this, but admins like Foo Bar can.

    >>> from zope.component import getUtility
    >>> from canonical.launchpad.interfaces.emailaddress import (
    ...     EmailAddressStatus, IEmailAddressSet)

    >>> login('admin@canonical.com')
    >>> address = getUtility(IEmailAddressSet).getByEmail('jvprat@wanadoo.es')
    >>> address.status = EmailAddressStatus.PREFERRED
    >>> transaction.commit()
    >>> logout()

    >>> anon_browser.open('https://launchpad.dev/~jvprat')
    >>> print find_tag_by_id(anon_browser.contents, 'email-addresses')
    None

    >>> user_browser.open('https://launchpad.dev/~jvprat')
    >>> print find_tag_by_id(user_browser.contents, 'email-addresses')
    None

    >>> admin_browser.open('https://launchpad.dev/~jvprat')
    >>> print extract_text(
    ...     find_tag_by_id(admin_browser.contents, 'email-addresses'))
    jvprat@wanadoo.es
    Change e-mail settings