Skip to content

Commit 6ec903f

Browse files
authored
Remove user impersonation activity logging
Removed user impersonation logging logic from the script.
1 parent 5056cb6 commit 6ec903f

File tree

1 file changed

+3
-13
lines changed
  • Server-Side Components/Business Rules/User Impersonation Activity Logger

1 file changed

+3
-13
lines changed

Server-Side Components/Business Rules/User Impersonation Activity Logger/README.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,9 @@ The User Impersonation Activity Logger provides the following capabilities:
3030
// Table: incident
3131
// Script:
3232
(function executeRule(current, previous /*null when async*/) {
33-
if (new GlideImpersonate().isImpersonating()) { // Check if the user is impersonating
34-
if (current.comments.changes() || current.work_notes.changes()) { // Check if comments or work notes have changed
35-
let actualUserName = gs.getImpersonatingUserDisplayName();
36-
let impersonatedUserName = gs.getUserDisplayName();
37-
let logMessage = `User Impersonation Activity Detected:
38-
Timestamp : ${ new GlideDateTime()}
39-
Actual User: ${actualUserName}
40-
Impersonated User: ${impersonatedUserName}
41-
Comments added: ${current.comments || 'NA'}
42-
Work Notes added: ${current.work_notes || 'NA'}`;
43-
gs.info(logMessage);
44-
}
45-
}
33+
34+
//Add the logic here
35+
4636
})(current, previous);
4737
```
4838

0 commit comments

Comments
 (0)