l.s.i.a.IArchivePermissionSet(Interface) : interface documentation

Part of lp.soyuz.interfaces.archivepermission View In Hierarchy

The interface for ArchivePermissionSet.
Method checkAuthenticated The ArchivePermission records that authenticate the person.
Method permissionsForArchive All ArchivePermission records for the archive.
Method permissionsForPerson All ArchivePermission records for the person.
Method uploadersForComponent The ArchivePermission records for authorised component uploaders.
Method componentsForUploader The ArchivePermission records for the person's upload components.
Method packagesForUploader The ArchivePermission records for the person's upload packages.
Method uploadersForPackage The ArchivePermission records for authorised package uploaders.
Method packagesetsForUploader The ArchivePermission records for the person's package sets.
Method packagesetsForSourceUploader The package set based permissions for a given source and uploader.
Method packagesetsForSource All package set based permissions for the given archive and source.
Method isSourceUploadAllowed True if the person is allowed to upload the given source package.
Method uploadersForPackageset The ArchivePermission records for uploaders to the package set.
Method uploadersForPocket The ArchivePermission records for authorised pocket uploaders.
Method pocketsForUploader The ArchivePermission records for the person's upload pockets.
Method queueAdminsForComponent The ArchivePermission records for authorised queue admins.
Method componentsForQueueAdmin Return ArchivePermission for the person's queue admin components.
Method queueAdminsForPocket The ArchivePermission records for authorised pocket queue admins.
Method pocketsForQueueAdmin Return ArchivePermission for the person's queue admin pockets.
Method newPackageUploader Create and return a new ArchivePermission for an uploader.
Method newPackagesetUploader Create and return a new ArchivePermission for an uploader.
Method newComponentUploader Create and return a new ArchivePermission for an uploader.
Method newPocketUploader Create and return a new ArchivePermission for an uploader.
Method newQueueAdmin Create and return a new ArchivePermission for a queue admin.
Method newPocketQueueAdmin Create and return a new ArchivePermission for a queue admin.
Method deletePackageUploader Revoke upload permissions for a person.
Method deletePackagesetUploader Revoke upload permissions for a person.
Method deleteComponentUploader Revoke upload permissions for a person.
Method deletePocketUploader Revoke upload permissions for a person.
Method deleteQueueAdmin Revoke queue admin permissions for a person.
Method deletePocketQueueAdmin Revoke queue admin permissions for a person.
def checkAuthenticated(person, archive, permission, item):
The `ArchivePermission` records that authenticate the person.

:param person: An `IPerson` whom should be checked for authentication.
:param archive: The context `IArchive` for the permission check.
:param permission: The `ArchivePermissionType` to check.
:param item: The context `IComponent` or `ISourcePackageName` for the
    permission check.

:return: all the `ArchivePermission` records that match the parameters
supplied.  If none are returned, it means the person is not
authenticated in that context.
def permissionsForArchive(archive):
All ArchivePermission records for the archive.
ParametersarchiveAn IArchive.
def permissionsForPerson(person, archive):
All ArchivePermission records for the person.
ParameterspersonAn IPerson
archiveAn IArchive
def uploadersForComponent(archive, component=None):
The ArchivePermission records for authorised component uploaders.
ParametersarchiveThe context IArchive for the permission check.
componentOptional IComponent, if specified will only return records for uploaders to that component, otherwise all components are considered. You can also supply a string component name instead.
ReturnsArchivePermission records for all the uploaders who are authorised for the supplied component.
RaisesComponentNotFoundif the named component does not exist.
def componentsForUploader(archive, person):
The ArchivePermission records for the person's upload components.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to find out which components they have access to.
ReturnsArchivePermission records for all the components that 'person' is allowed to upload to.
def packagesForUploader(archive, person):
The ArchivePermission records for the person's upload packages.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to find out which packages they have access to.
ReturnsArchivePermission records for all the packages that 'person' is allowed to upload to.
def uploadersForPackage(archive, sourcepackagename):
The ArchivePermission records for authorised package uploaders.
ParametersarchiveThe context IArchive for the permission check.
sourcepackagenameAn ISourcePackageName or a string package name.
ReturnsArchivePermission records for all the uploaders who are authorised to upload the named source package.
RaisesSourceNotFoundif the string package name does not exist.
def packagesetsForUploader(archive, person):
The ArchivePermission records for the person's package sets.
ParametersarchiveThe archive the permission applies to.
personAn IPerson for whom you want to find out which package sets they have access to.
ReturnsArchivePermission records for all the package sets that 'person' is allowed to upload to.
def packagesetsForSourceUploader(archive, sourcepackagename, person):

The package set based permissions for a given source and uploader.

Return the IArchivePermission records that
  • apply to the given archive

  • relate to
    • package sets that include the given source package name
    • the given person
ParametersarchiveThe archive the permission applies to.
sourcepackagenamethe source package name; can be either a string or a ISourcePackageName.
personAn IPerson for whom you want to find out which package sets they have access to.
ReturnsArchivePermission records for the package sets that include the given source package name and to which the given person may upload.
RaisesSourceNotFoundif a source package with the given name could not be found.
def packagesetsForSource(archive, sourcepackagename, direct_permissions=True):
All package set based permissions for the given archive and source.

This method is meant to aid the process of "debugging" package set based archive permission since It allows the listing of permissions for the given source package irrespective of a person.

ParametersarchiveThe archive the permission applies to.
sourcepackagenamethe source package name; can be either a string or a ISourcePackageName.
direct_permissionsIf set, only package sets that directly include the given source will be considered.
ReturnsArchivePermission records for the package sets that include the given source package name and apply to the archive in question.
RaisesSourceNotFoundif a source package with the given name could not be found.
def isSourceUploadAllowed(archive, sourcepackagename, person, distroseries):
True if the person is allowed to upload the given source package.

Return True if there exists a permission that combines
  • the given archive
  • a package set that includes the given source package name
  • the given person or a team they are a member of

If the source package name is included by any package set with an explicit permission then only such explicit permissions will be considered.

ParametersarchiveThe archive the permission applies to.
sourcepackagenamethe source package name; can be either a string or a ISourcePackageName.
personAn IPerson for whom you want to find out which package sets they have access to.
distroseriesThe IDistroSeries for which to check permissions.
ReturnsTrue if the person is allowed to upload the source package.
RaisesSourceNotFoundif a source package with the given name could not be found.
def uploadersForPackageset(archive, packageset, direct_permissions=True):

The ArchivePermission records for uploaders to the package set.

Please note: if a package set name is passed the respective
package set in the current distro series will be used.
ParametersarchiveThe archive the permission applies to.
packagesetAn IPackageset or a string package set name.
direct_permissionsIf True only consider permissions granted directly for the package set at hand. Otherwise, include any uploaders for package sets that include this one.
ReturnsArchivePermission records for all the uploaders who are authorized to upload to the named source package set.
RaisesNotFoundErrorif no package set exists with the given name.
def uploadersForPocket(archive, pocket):
The ArchivePermission records for authorised pocket uploaders.
ParametersarchiveThe context IArchive for the permission check.
pocketA PackagePublishingPocket.
ReturnsArchivePermission records for all the uploaders who are authorised for the supplied pocket.
def pocketsForUploader(archive, person):
The ArchivePermission records for the person's upload pockets.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to find out which pockets they have access to.
ReturnsArchivePermission records for all the pockets that 'person' is allowed to upload to.
def queueAdminsForComponent(archive, component):
The ArchivePermission records for authorised queue admins.
ParametersarchiveThe context IArchive for the permission check.
componentThe context IComponent for the permission check. You can also supply a string component name instead.
ReturnsArchivePermission records for all the person who are allowed to administer the distroseries upload queue.
def componentsForQueueAdmin(archive, person):
Return `ArchivePermission` for the person's queue admin components.

:param archive: The context `IArchive` for the permission check, or
    an iterable of `IArchive`s.
:param person: An `IPerson` for whom you want to find out which
    components they have access to.

:return: `ArchivePermission` records for all the components that
    'person' is allowed to administer the queue for.
def queueAdminsForPocket(archive, pocket, distroseries=None):
The ArchivePermission records for authorised pocket queue admins.
ParametersarchiveThe context IArchive for the permission check.
pocketA PackagePublishingPocket.
distroseriesAn optional IDistroSeries.
ReturnsArchivePermission records for all the persons who are allowed to administer the pocket upload queue.
def pocketsForQueueAdmin(archive, person):
Return `ArchivePermission` for the person's queue admin pockets.

:param archive: The context `IArchive` for the permission check, or
    an iterable of `IArchive`s.
:param person: An `IPerson` for whom you want to find out which
    pockets they have access to.

:return: `ArchivePermission` records for all the pockets that
    'person' is allowed to administer the queue for.
def newPackageUploader(archive, person, sourcepackagename):
Create and return a new ArchivePermission for an uploader.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to add permission.
sourcepackagenameAn ISourcePackageName or a string package name.
ReturnsThe new ArchivePermission, or the existing one if it already exists.
def newPackagesetUploader(archive, person, packageset, explicit=False):

Create and return a new ArchivePermission for an uploader.

Please note: if a package set name is passed the respective
package set in the current distro series will be used.
ParametersarchiveThe archive the permission applies to.
personAn IPerson for whom you want to add permission.
packagesetAn IPackageset or a string package set name.
explicitTrue if the permissions granted by this package set exclude permissions granted by non-explicit package sets.
ReturnsThe new ArchivePermission, or the existing one if it already exists.
RaisesValueErrorif an ArchivePermission record for this person and packageset already exists but with a different 'explicit' flag value.
def newComponentUploader(archive, person, component):
Create and return a new ArchivePermission for an uploader.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to add permission.
componentAn IComponent or a string package name.
ReturnsThe new ArchivePermission, or the existing one if it already exists.
def newPocketUploader(archive, person, pocket):
Create and return a new ArchivePermission for an uploader.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to add permission.
componentA PackagePublishingPocket.
ReturnsThe new ArchivePermission, or the existing one if it already exists.
def newQueueAdmin(archive, person, component):
Create and return a new ArchivePermission for a queue admin.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to add permission.
componentAn IComponent or a string package name.
ReturnsThe new ArchivePermission, or the existing one if it already exists.
def newPocketQueueAdmin(archive, person, pocket, distroseries=None):
Create and return a new ArchivePermission for a queue admin.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to add permission.
pocketA PackagePublishingPocket.
distroseriesAn optional IDistroSeries.
ReturnsThe new ArchivePermission, or the existing one if it already exists.
def deletePackageUploader(archive, person, sourcepackagename):
Revoke upload permissions for a person.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to revoke permission.
sourcepackagenameAn ISourcePackageName or a string package name.
def deletePackagesetUploader(archive, person, packageset, explicit=False):

Revoke upload permissions for a person.

Please note: if a package set name is passed the respective
package set in the current distro series will be used.
ParametersarchiveThe archive the permission applies to.
personAn IPerson for whom you want to revoke permission.
packagesetAn IPackageset or a string package set name.
explicitThe value of the 'explicit' flag for the permission to be revoked.
def deleteComponentUploader(archive, person, component):
Revoke upload permissions for a person.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to revoke permission.
componentAn IComponent or a string package name.
def deletePocketUploader(archive, person, pocket):
Revoke upload permissions for a person.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to revoke permission.
pocketA PackagePublishingPocket.
def deleteQueueAdmin(archive, person, component):
Revoke queue admin permissions for a person.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to revoke permission.
componentAn IComponent or a string package name.
def deletePocketQueueAdmin(archive, person, pocket, distroseries=None):
Revoke queue admin permissions for a person.
ParametersarchiveThe context IArchive for the permission check.
personAn IPerson for whom you want to revoke permission.
pocketA PackagePublishingPocket.
distroseriesAn optional IDistroSeries.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.