Attenuations

Attenuations are permissions that restrict what a discharged macaroon token can do. When an app makes an account request, with credentials, to the Snap Store or Charmhub, it passes a list of attenuations that limits the capabilities of those credentials.

All constants are available in the craft_store.attenuations module.

Read-write attenuations

craft_store.attenuations.ACCOUNT_MANAGE_KEYS = 'account-manage-keys'

Manage account keys.

craft_store.attenuations.ACCOUNT_MANAGE_METADATA = 'account-manage-metadata'

Manage account metadata.

craft_store.attenuations.ACCOUNT_REGISTER_PACKAGE = 'account-register-package'

Register or request a new package name under a given account.

craft_store.attenuations.PACKAGE_MANAGE = 'package-manage'

Meta permission for easing creation of a complete RW token, it grants all the package-manage-* permissions.

craft_store.attenuations.PACKAGE_MANAGE_ACL = 'package-manage-acl'

Add, invite or remove collaborators.

craft_store.attenuations.PACKAGE_MANAGE_LIBRARY = 'package-manage-library'

Register or request a new library name under a given package.

craft_store.attenuations.PACKAGE_MANAGE_METADATA = 'package-manage-metadata'

Edit metadata, add or remove media, etc.

craft_store.attenuations.PACKAGE_MANAGE_RELEASES = 'package-manage-releases'

Release revisions, close channels and update version pattern for a track.

craft_store.attenuations.PACKAGE_MANAGE_REVISIONS = 'package-manage-revisions'

Upload new blobs, check for upload status, reject a revision blocked on manual review or request manual review.

craft_store.attenuations.STORE_MANAGE = 'store-manage'

Manage store settings.

Read-only attenuations

craft_store.attenuations.ACCOUNT_VIEW_PACKAGES = 'account-view-packages'

List packages owned by the account and packages for which this account has collaborator rights.

craft_store.attenuations.PACKAGE_VIEW = 'package-view'

Meta permission for easing creation of a complete read only token grants all the package-view-* permissions.

craft_store.attenuations.PACKAGE_VIEW_ACL = 'package-view-acl'

List the collaborators for a package and privacy settings.

craft_store.attenuations.PACKAGE_VIEW_METADATA = 'package-view-metadata'

View the metadata for a package, including media.

craft_store.attenuations.PACKAGE_VIEW_METRICS = 'package-view-metrics'

View the metrics of a package.

craft_store.attenuations.PACKAGE_VIEW_RELEASES = 'package-view-releases'

List the current releases (channel map) for a package and the release history of a package.

craft_store.attenuations.PACKAGE_VIEW_REVISIONS = 'package-view-revisions'

List the existing revisions for a package, along with status information.

craft_store.attenuations.STORE_VIEW = 'store-view'

View store settings.