Jump to >

djblets.privacy.consent.common

Common consent requirements for use in applications.

This provides some basic definitions with standard requirement IDs that can be further customized by applications needing to offer consent for services.

class BaseGravatarConsentRequirement[source]

Bases: djblets.privacy.consent.base.BaseConsentRequirement

Base consent requirement for Gravatar usage.

This supplies a requirement ID, name, default summary, and default data use description for Gravatar consent requirements. Subclasses should provide their own intent and data use descriptions.

requirement_id = 'gravatar'[source]

The unique ID of the requirement.

name = 'Gravatar'[source]

The name of the requirement.

summary = "We'd like to use Gravatar.com for your avatars"[source]

A brief summary of the requirement.

data_use_description = "Gravatar will receive a one-way hashed version of your e-mail address. This is not personally identifiable, but could potentially be used to track you across multiple sites that use Gravatar. Gravatar only has an avatar for you if you've set one with their service."[source]

A short description of what data will be sent and how it will be used.

__annotations__ = {}
class BaseIntercomConsentRequirement[source]

Bases: djblets.privacy.consent.base.BaseConsentRequirement

Base consent requirement for Intercom usage.

This supplies a requirement ID, name, and default summary for Intercom consent requirements. Subclasses should provide their own intent and data use descriptions.

requirement_id = 'intercom'[source]

The unique ID of the requirement.

name = 'Intercom'[source]

The name of the requirement.

summary = "We'd like to support and track activity using Intercom"[source]

A brief summary of the requirement.

__annotations__ = {}
class PolicyConsentRequirement(privacy_policy_url, terms_of_service_url, site_admin_email=None, reject_instructions=None)[source]

Bases: djblets.privacy.consent.base.BaseConsentRequirement

A consent requirement for asking users to acknowledge policies.

requirement_id = 'policies'[source]

The unique ID of the requirement.

allow_text = 'Accept'[source]

Text to use for the allow action.

allowed_text = 'Accepted'[source]

Text to use for when the allow action is selected.

block_text = 'Reject'[source]

Text to use for the block action.

blocked_text = 'Rejected'[source]

Text to use for when the block action is selected.

__init__(privacy_policy_url, terms_of_service_url, site_admin_email=None, reject_instructions=None)[source]

Initialize the consent requirement.

Parameters
  • privacy_policy_url (unicode) – The URL to the privacy policy, if applicable.

  • terms_of_service (unicode) – The URL to the terms of service, if applicable.

  • site_admin_email (unicode, optional) – The e-mail address of the site admin. This is only used if reject_instructions is provided.

  • reject_instructions (unicode, optional) – Instructions for how the user should proceed if they do not accept the policies.

property name[source]

The name of the requirement.

property summary[source]

A brief summary of the requirement.

property intent_description[source]

A short description of why the requirement is needed.

__annotations__ = {}