Wiki

Clone wiki

jummp / audit

Jummp includes an access history mechanism for any access to the model data. This is useful for audit as well as optimisation purposes. The following actions are tracked for all models: create, update, read, publish, archive and download. For each of these actions the following information is stored

  • The model accessed

  • The user performing the action

  • The means of access (HTML, XML or JSON)

  • The date

  • The changes made (relevant in the case of update)

  • Success - whether or not the action completed successfully

The mechanism by which the audit trail is generated relies primarily on controller interceptors, written for the model controller (with two exceptions). A beforeInterceptor creates a model audit object, capturing all the relevant information, and setting the success parameter to false. A reference to the object is stored in the session. This reference is used by an afterInterceptor to set the success to true. If the action throws an exception, the afterInterceptor is not called, and therefore the success remains false.

The exceptions for this mechanism are the model create and update actions. These are not captured by interceptors, as they are implemented by webflows, which dont seem to play well with interceptors. Therefore, when the create and update flows return from the upload subflow (see submission pipeline) the function of ModelController responsible for creating the audit object, updateHistory, is called with appropriate success parameters. Additionally, the upload subflow passes through the conversation scope a changesMade object, which maintains a sorted list of changes made during the submission.

Updated