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
|
An anonymous user who tries to access the bugtask edit page will be
redirected to the login page.
>>> browser.open("http://launchpad.dev/thunderbird/+bug/9/+editstatus")
Traceback (most recent call last):
...
Unauthorized: ...
Even when the product has a bug supervisor, see bug #49891.
>>> from zope.component import getUtility
>>> from lp.services.database.sqlbase import flush_database_updates
>>> from lp.testing import login, logout
>>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.registry.interfaces.product import IProductSet
>>> login("test@canonical.com")
>>> from lp.services.database.lpstorm import IMasterObject
>>> firefox = IMasterObject(getUtility(IProductSet).getByName("firefox"))
>>> sample_person = IMasterObject(
... getUtility(IPersonSet).getByName("name12"))
>>> firefox.setBugSupervisor(sample_person, sample_person)
>>> flush_database_updates()
>>> logout()
>>> browser.open("http://launchpad.dev/firefox/+bug/1/+editstatus")
Traceback (most recent call last):
...
Unauthorized: ...
Any logged-in user can edit a bugtask.
>>> browser = setupBrowser(auth="Basic test@canonical.com:test")
>>> browser.open("http://launchpad.dev/firefox/+bug/6/+editstatus")
>>> print browser.title
Edit status ...
|