Interface IConsentService
A service for handling lawful data processing requirements
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IConsentService : IService
Remarks
Consent can be given or revoked or changed via the Register
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. |
source | The optional source. |
System. |
context | The optional context. |
System. |
action | The optional action. |
System. |
sourceStartsWith | Determines whether |
System. |
contextStartsWith | Determines whether |
System. |
actionStartsWith | Determines whether |
System. |
includeHistory | Determines whether to include the history of consents. |
Returns
Type | Description |
---|---|
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. |
source | The source, i.e. whoever is consenting. |
System. |
context | |
System. |
action | |
Consent |
state | The state of the consent. |
System. |
comment | Additional free text. |
Returns
Type | Description |
---|---|
IConsent | The corresponding consent entity. |