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¶
Bases:
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'¶
The unique ID of the requirement.
- name = 'Gravatar'¶
The name of the requirement.
- summary = "We'd like to use Gravatar.com for your avatars"¶
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."¶
A short description of what data will be sent and how it will be used.
- class BaseIntercomConsentRequirement¶
Bases:
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'¶
The unique ID of the requirement.
- name = 'Intercom'¶
The name of the requirement.
- summary = "We'd like to support and track activity using Intercom"¶
A brief summary of the requirement.
- class PolicyConsentRequirement(privacy_policy_url, terms_of_service_url, site_admin_email=None, reject_instructions=None)¶
Bases:
BaseConsentRequirement
A consent requirement for asking users to acknowledge policies.
- requirement_id = 'policies'¶
The unique ID of the requirement.
- allow_text = 'Accept'¶
Text to use for the allow action.
- allowed_text = 'Accepted'¶
Text to use for when the allow action is selected.
- block_text = 'Reject'¶
Text to use for the block action.
- blocked_text = 'Rejected'¶
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)¶
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 ifreject_instructions
is provided.reject_instructions (
unicode
, optional) – Instructions for how the user should proceed if they do not accept the policies.
- property name¶
The name of the requirement.
- property summary¶
A brief summary of the requirement.
- property intent_description¶
A short description of why the requirement is needed.