Interface IConsentService
A service for handling lawful data processing requirements
Namespace: Umbraco.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IConsentService : IService
Remarks
Consent can be given or revoked or changed via the RegisterConsent(String, String, String, ConsentState, String) method, which creates a new IConsent entity to track the consent. Revoking a consent is performed by registering a revoked consent.
A consent can be revoked, by registering a revoked consent, but cannot be deleted.
Getter methods return the current state of a consent, i.e. the latest IConsent entity that was created.
Methods
View SourceLookupConsent(String, String, String, Boolean, Boolean, Boolean, Boolean)
Retrieves consents.
Declaration
IEnumerable<IConsent> LookupConsent(string source = null, string context = null, string action = null, bool sourceStartsWith = false, bool contextStartsWith = false, bool actionStartsWith = false, bool includeHistory = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | The optional source. |
System.String | context | The optional context. |
System.String | action | The optional action. |
System.Boolean | sourceStartsWith | Determines whether |
System.Boolean | contextStartsWith | Determines whether |
System.Boolean | actionStartsWith | Determines whether |
System.Boolean | includeHistory | Determines whether to include the history of consents. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IConsent> | Consents matching the parameters. |
RegisterConsent(String, String, String, ConsentState, String)
Registers consent.
Declaration
IConsent RegisterConsent(string source, string context, string action, ConsentState state, string comment = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | The source, i.e. whoever is consenting. |
System.String | context | |
System.String | action | |
ConsentState | state | The state of the consent. |
System.String | comment | Additional free text. |
Returns
Type | Description |
---|---|
IConsent | The corresponding consent entity. |