Skip to contents

Stores a preview digest, optional notes, and a timestamp in an object used by zotExecute().

Usage

zotApprove(preview, notes = "")

Arguments

preview

A zotPreview() object.

notes

Free-text metadata associated with the record.

Value

A zotApproval containing the preview digest.

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

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