project-lux / lux-marklogic

Code, issues, and resources related to LUX MarkLogic
Other
3 stars 2 forks source link

Provide alternative means to set document permissions when loading content using Flux #368

Open brent-hartwig opened 2 weeks ago

brent-hartwig commented 2 weeks ago

Problem Description: In order to load content using Flux, we need an alternative to a document transform (#351). As documented in https://git.yale.edu/lux-its/datatransfer/issues/54#issuecomment-29189:

  1. Flux consumes the /v1/documents endpoint.
  2. The /v1/documents endpoint supports a transform, but not one that is able to change document permissions, such as MLCP can do.
  3. Engineering may add this ability in MarkLogic Server 12.1.
  4. Instead of waiting, we can employ a different feature that's available now: trigger.

Expected Behavior/Solution: Create a pre-commit trigger to set the permissions within the same transaction. It appears to be the functional (and performant) equivalent to LUX's MLCP transform. Could be even safer as Flux doesn't need to specify anything for the trigger to fire. Also compatible with MLCP.

We can configure ML Gradle to create a (very small) triggers database for lux-content and deploy the trigger.

Also in scope:

  1. Update existing documentation on loading content.
  2. Delete the document transform.

While the Content Processing Framework (CPF) uses triggers, a single pre-commit trigger is all that is needed to set document permissions.

Estimate of 2-4 hours of work

Requirements:

Needed for promotion: If an item on the list is not needed, it should be crossed off but not removed.

~- [ ] Wireframe/Mockup - Mike~

UAT/LUX Examples: N/A - Unreviewable.

Dependencies/Blocks: This ticket is blocking https://git.yale.edu/lux-its/datatransfer/issues/54.

Related Github Issues: None.

Related links: None.

Wireframe/Mockup: N/A

brent-hartwig commented 6 days ago

Estimate: 2h - 4h