Changes between Version 19 and Version 20 of S3/ConsentTracking


Ignore:
Timestamp:
06/13/19 08:32:51 (6 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/ConsentTracking

    v19 v20  
    9595=== consent_query ===
    9696
    97 ''[tbd]''
     97The {{{auth_Consent.consent_query}}} method can be used to filter a DAL table for records belonging to persons that have consented to a particular processing type:
     98
     99{{{#!python
     100# Get HR records where the person has consented to the HRDSHARE processing type:
     101table = s3db.hrm_human_resource
     102query = s3db.auth_Consent.consent_query(table, "HRDSHARE", field="person_id") & (table.deleted==False)
     103rows = db(query).select(...)
     104}}}
     105
     106If {{{field}}} is not specified, {{{person_id}}} will be assumed (or {{{id}}} when the table is pr_person).
     107
     108{{{consent_query}}} is a class method, so instantiation of {{{auth_Consent}}} is not required.
     109
     110The consent sub-query will include an implicit inner join with the {{{auth_consent}}} table (not aliased), which may need to be taken into account when the overall query constructs additional joins.
     111
     112{{{consent_query}}} takes into account whether the consent record or the consent option have expired, but it will not verify the integrity of any consent records.
    98113=== consent_filter ===
    99114