Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
OC-16858 Attribute autoqueries to system user
Browse files Browse the repository at this point in the history
  • Loading branch information
theywa committed Jan 17, 2024
1 parent bc7dc55 commit cecde8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions test/client/dn-widget.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ describe('DN object', () => {
['{"queries":[], "logs":[{"type": "comment"}]}', ''],
// first has system user
[
'{"queries":[], "logs":[{"type": "comment", "status": "updated", "user": "root", "date_time":2}]}',
'{"queries":[], "logs":[{"type": "comment", "status": "updated", "user": "system", "date_time":2}]}',
'',
],
[
'{"queries":[{"type": "comment", "status": "updated", "user": "root", "date_time":2}], "logs":[]}',
'{"queries":[{"type": "comment", "status": "updated", "user": "system", "date_time":2}], "logs":[]}',
'',
],
// first has empty user
Expand All @@ -372,20 +372,20 @@ describe('DN object', () => {
],
// first root ignored, next is taken
[
'{"queries":[], "logs":[{"type": "audit", "user": "root", "date_time":2},{"type": "comment", "user": "jen", "date_time":1}]}',
'{"queries":[], "logs":[{"type": "audit", "user": "system", "date_time":2},{"type": "comment", "user": "jen", "date_time":1}]}',
'jen',
],
[
'{"queries":[{"type": "audit", "user": "root", "date_time":2},{"type": "comment", "user": "jen", "date_time":1}], "logs":[]}',
'{"queries":[{"type": "audit", "user": "system", "date_time":2},{"type": "comment", "user": "jen", "date_time":1}], "logs":[]}',
'jen',
],
// same, but switched order (same date_time) to test ordering
[
'{"queries":[], "logs":[{"type": "comment", "user": "jen", "date_time":1}, {"type": "audit", "user": "root", "date_time":2}]}',
'{"queries":[], "logs":[{"type": "comment", "user": "jen", "date_time":1}, {"type": "audit", "user": "system", "date_time":2}]}',
'jen',
],
[
'{"queries":[{"type": "comment", "user": "jen", "date_time":1}, {"type": "audit", "user": "root", "date_time":2}], "logs":[]}',
'{"queries":[{"type": "comment", "user": "jen", "date_time":1}, {"type": "audit", "user": "system", "date_time":2}], "logs":[]}',
'jen',
],
].forEach((test) => {
Expand Down
2 changes: 1 addition & 1 deletion widget/discrepancy-note/dn-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import reasons from '../../public/js/src/module/reasons';
let currentUser;
let users;
let annotationIconDataUri;
const SYSTEM_USER = 'root';
const SYSTEM_USER = 'system';

const pad2 = (x) => (x < 10 ? `0${x}` : x);

Expand Down

0 comments on commit cecde8c

Please sign in to comment.