Add batch job that is able to read from Sonador `user/history` and `group/history` to remove stale user and group ACL policies
One of the challenges with the user/group permission structure in Orthanc is that there is no trigger for pruning ACL grants for user or group instances that have been removed from the Sonador database. To that end, a set of history
models and endpoints will be created within Sonador to help facilitate synchronization (refer to sonador#58).
A batch job is needed within Orthanc to run on a timer (every fifteen minutes is probably sufficient) to retrieve the history of actions which apply to the server, look for user and group instances which have changed, and then execute queries to remove any out of date policies with series, study, and patient resources.
Development tasks:
-
Create batch events for pulling changes from Sonador and processing within Orthanc -
Create a "log" table for tracking the most recent time the user/group sync occurred -
Create an API endpoint so that synchronization can be triggered manually (needed for testing)