BestowalFieldAccessService
in package
Applies field-level authorization to protected bestowal data.
Table of Contents
Constants
- ACTION_ACCESS_CROWN_FIELDS : mixed = 'accessCrownFields'
- ACTION_ACCESS_HERALD_NOTES : mixed = 'accessHeraldNotes'
- CROWN_MUTATION_FIELDS : mixed = ['noble_notes', 'nobleNotes', 'reason_summary',...
- HERALD_MUTATION_FIELDS : mixed = ['herald_notes', 'heraldNotes']
Methods
- accessFor() : array{heraldNotes: bool, crownFields: bool}
- deniedMutationFields() : array<int, string>
- Return protected submitted fields the identity is not allowed to mutate.
- redact() : array{heraldNotes: bool, crownFields: bool}
- Remove protected fields and associations before rendering or serializing.
- redactAgendaViewModel() : array<string, mixed>
- Redact protected bestowal data embedded in a court agenda view model.
Constants
ACTION_ACCESS_CROWN_FIELDS
public
mixed
ACTION_ACCESS_CROWN_FIELDS
= 'accessCrownFields'
ACTION_ACCESS_HERALD_NOTES
public
mixed
ACTION_ACCESS_HERALD_NOTES
= 'accessHeraldNotes'
CROWN_MUTATION_FIELDS
private
mixed
CROWN_MUTATION_FIELDS
= ['noble_notes', 'nobleNotes', 'reason_summary', 'reasonSummary', 'link_recommendation_ids', 'unlink_recommendation_ids']
HERALD_MUTATION_FIELDS
private
mixed
HERALD_MUTATION_FIELDS
= ['herald_notes', 'heraldNotes']
Methods
accessFor()
public
accessFor(KmpIdentityInterface $identity, Bestowal $bestowal) : array{heraldNotes: bool, crownFields: bool}
Parameters
- $identity : KmpIdentityInterface
- $bestowal : Bestowal
Return values
array{heraldNotes: bool, crownFields: bool}deniedMutationFields()
Return protected submitted fields the identity is not allowed to mutate.
public
deniedMutationFields(array<string, mixed> $data, KmpIdentityInterface $identity, Bestowal $bestowal) : array<int, string>
Parameters
- $data : array<string, mixed>
-
Submitted mutation data.
- $identity : KmpIdentityInterface
- $bestowal : Bestowal
Return values
array<int, string>redact()
Remove protected fields and associations before rendering or serializing.
public
redact(Bestowal $bestowal, KmpIdentityInterface $identity) : array{heraldNotes: bool, crownFields: bool}
Parameters
- $bestowal : Bestowal
- $identity : KmpIdentityInterface
Return values
array{heraldNotes: bool, crownFields: bool}redactAgendaViewModel()
Redact protected bestowal data embedded in a court agenda view model.
public
redactAgendaViewModel(array<string, mixed> $viewModel, KmpIdentityInterface $identity) : array<string, mixed>
Parameters
- $viewModel : array<string, mixed>
-
Court agenda view model.
- $identity : KmpIdentityInterface