Now the methods for reading and adjusting archive permissions are restricted to IArchive lp.Edit permission (owners) instead of the *special* IArchivePermissionSet (only tech board)
- From now own ubuntu-drivers will be able to allow new uploaders in ubuntu primary archive and PPA owners will be able to do the same for their PPAs.
== Tests ==
./bin/test -vv -t xx-archive.txt
== Demo and Q/A ==
Create a PPA if the user you are logged in doesn't have one, otherwise adjust the parameters of the code snipped below
1. Reading permissions:
{{{
user = lp.people['no-priv']
ppa = lp.me.getPPAByName(name='ppa')
print 'Permission for %s in %s' % ( user.display_name, ppa.displayname)
for perm in ppa.getPermissionsForPerson(person=user):
print perm.permission
}}}
lib/lp/soyuz/interfaces/archive.py
39: [F0401] Unable to import 'lazr.enum' (No module named enum)
52: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)
58: [F0401] Unable to import 'lazr.restful.fields' (No module named restful)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
= Summary =
This branch fixes https:/ /bugs.edge. launchpad. net/bugs/ 422965.
Now the methods for reading and adjusting archive permissions are restricted to IArchive lp.Edit permission (owners) instead of the *special* IArchivePermiss ionSet (only tech board)
- From now own ubuntu-drivers will be able to allow new uploaders in ubuntu primary archive and PPA owners will be able to do the same for their PPAs.
== Tests ==
./bin/test -vv -t xx-archive.txt
== Demo and Q/A ==
Create a PPA if the user you are logged in doesn't have one, otherwise adjust the parameters of the code snipped below
1. Reading permissions: 'no-priv' ] ame(name= 'ppa')
user.display_ name, ppa.displayname) onsForPerson( person= user):
{{{
user = lp.people[
ppa = lp.me.getPPAByN
print 'Permission for %s in %s' % (
for perm in ppa.getPermissi
print perm.permission
}}}
2. Setting permission: 'no-priv' ] ame(name= 'ppa') newComponentUpl oader(person= user, component_ name='main' )
{{{
user = lp.people[
ppa = lp.me.getPPAByN
ppa.
}}}
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: soyuz/stories/ webservice/ xx-archive. txt soyuz/interface s/archive. py soyuz/configure .zcml
lib/lp/
lib/lp/
lib/lp/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkq ykjkACgkQ7KBXuX yZSjB0xQCgkLYFy zzQ87e23tJDuY7A mJDw 82ziAtkXXhvfszi CW
RlkAn1yplbsf24s
=R4q7
-----END PGP SIGNATURE-----
== Pylint notices ==
lib/lp/ soyuz/interface s/archive. py declarations' (No module named restful) fields' (No module named restful)
39: [F0401] Unable to import 'lazr.enum' (No module named enum)
52: [F0401] Unable to import 'lazr.restful.
58: [F0401] Unable to import 'lazr.restful.