Create an approval record for a preview
zotApprove.RdStores a preview digest, optional notes, and a timestamp in an object used
by zotExecute().
Arguments
- preview
A
zotPreview()object.- notes
Free-text metadata associated with the record.
Details
This function does not authenticate a person, evaluate an authorization
policy, display the plan, or perform a write. The calling application
determines how approval records are created. A preview should not be
modified after this record is created because zotExecute() compares stored
digests and does not recalculate the plan digest.
See also
zotPreview() and zotExecute().
Examples
Plan <- data.table::data.table(
action = "patch", library = "user", itemKey = "ABCD1234",
payload = list(list(title = "A reviewed title"))
)
Preview <- zotPreview(Plan, describe = "Synthetic documentation batch")
Approval <- zotApprove(Preview, notes = "Documentation example")
Approval$digest == Preview$digest
#> [1] TRUE