Non-admins cannot change PPA privacy after creation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
High
|
Unassigned |
Bug Description
Although anyone with a commercial subscription may *create* a private PPA, only commercial administrators and admins may change the 'private' attribute of a PPA. In particular, the creator of a private PPA may not make that PPA public without (commercial) admin intervention.
This is because the 'private' attribute of IArchive requires 'launchpad.
I do not think it appropriate to grant PPA owners who are commercial subscribers full launchpad.
Some solutions occur to me:
1. Make setting 'private' require only 'launchpad.Edit', and check for commercial subscriptions in the property.
2. Create a new permission level meaning something like "I have paid for extra privileges", and have 'private' require that.
3. Use the existing, strange permission 'launchpad.
4. Move the current permissions granted by 'launchpad.
1 is essentially ignoring the Zope permission system. 2 has been deprecated in past conversations with the technical architect. 3 seems wrong. 4 is very high impact and rather risky.
How to reproduce the problem:
from launchpadlib.
import os
APP_NAME = 'create-
CACHE_DIR = os.path.
LP_INSTANCE = 'production'
lp = Launchpad.
jml = lp.people['jml']
ppa = jml.getPPAByNam
ppa.private = False
ppa.lp_save()
Produces the following output:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
URI(
File "/usr/lib/
'PATCH', extra_headers=
File "/usr/lib/
raise error
lazr.
Response headers:
---
-content-
connection: close
content-length: 60
content-type: text/plain
date: Thu, 14 Jun 2012 17:53:07 GMT
server: zope.server.http (HTTP)
status: 401
strict-
vary: Accept,
via: 1.1 api.launchpad.net
x-content-
x-frame-options: SAMEORIGIN
x-lazr-
x-powered-by: Zope (www.zope.org), Python (www.python.org)
x-xss-protection: 1; mode=block
---
Response body:
---
(<Archive at 0x13dcd110>, 'private', 'launchpad.
---
description: | updated |
Changed in launchpad: | |
status: | New → Triaged |
importance: | Undecided → High |
Note that it's not currently possible for even an admin to change an archive's privacy once it's been used.