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 = u'gravatar'[source]
name = _(u'Gravatar')[source]
summary = _(u"We'd like to use Gravatar.com for your avatars")[source]
data_use_description = _(u"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]
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 = u'intercom'[source]
name = u'Intercom'[source]
summary = _(u"We'd like to support and track activity using Intercom")[source]
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 = u'policies'[source]
allow_text = _(u'Accept')[source]
allowed_text = _(u'Accepted')[source]
block_text = _(u'Reject')[source]
blocked_text = _(u'Rejected')[source]
__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.
name[source]

The name of the requirement.

summary[source]

A brief summary of the requirement.

intent_description[source]

A short description of why the requirement is needed.