https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42035

            Bug ID: 42035
           Summary: Add diff support to APIKEYS CREATE and DELETE action
                    logs
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Transaction logs
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
            Blocks: 37940

The action logging for the APIKEYS module (Koha/ApiKey.pm) already has diff
support for MODIFY, REVOKE, and ACTIVATE actions. However, CREATE and DELETE
actions do not pass the $original parameter.

Affected calls in Koha/ApiKey.pm:
- APIKEYS/CREATE (~line 84):
  logaction( 'APIKEYS', 'CREATE', $self->patron_id, $self, undef );
  (passes $self as $infos but no $original; for CREATE, $self represents the
new state)

- APIKEYS/DELETE (~line 142):
  logaction( 'APIKEYS', 'DELETE', $patron_id )
  (no info or original passed at all)

For CREATE, passing $self as both $infos and $original (or with undef original)
would allow the viewer to show what was created. For DELETE, the API key object
should be fetched before deletion and passed as both $infos and $original so
the log shows what was deleted. This is important for security audit trails.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37940
[Bug 37940] [OMNIBUS] All modification logged via action logs should include
original to create JSON diff
-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to