Commit 1a5ac73611f82987b110b8518189f33617e08700
Exists in
master
and in
1 other branch
Merge pull request #524 from roryf/master
Adds current user information to notifier.js
Showing
1 changed file
with
17 additions
and
3 deletions
Show diff stats
public/javascripts/notifier.js
... | ... | @@ -515,6 +515,11 @@ printStackTrace.implementation.prototype = { |
515 | 515 | '<project-root>{project_root}</project-root>' + |
516 | 516 | '<environment-name>{environment}</environment-name>' + |
517 | 517 | '</server-environment>' + |
518 | + '<current-user>' + | |
519 | + '<id>{user_id}</id>' + | |
520 | + '<name>{user_name}</name>' + | |
521 | + '<email>{user_email}</email>' + | |
522 | + '</current-user>' + | |
518 | 523 | '</notice>', |
519 | 524 | REQUEST_VARIABLE_GROUP_XML = '<{group_name}>{inner_content}</{group_name}>', |
520 | 525 | REQUEST_VARIABLE_XML = '<var key="{key}">{value}</var>', |
... | ... | @@ -547,9 +552,9 @@ printStackTrace.implementation.prototype = { |
547 | 552 | "rootDirectory": "{project_root}", |
548 | 553 | "action": "{request_action}", |
549 | 554 | |
550 | - "userId": "{}", | |
551 | - "userName": "{}", | |
552 | - "userEmail": "{}", | |
555 | + "userId": "{user_id}", | |
556 | + "userName": "{user_name}", | |
557 | + "userEmail": "{user_email}", | |
553 | 558 | }, |
554 | 559 | "environment": {}, |
555 | 560 | //"session": "", |
... | ... | @@ -819,6 +824,15 @@ printStackTrace.implementation.prototype = { |
819 | 824 | variable: 'outputFormat', |
820 | 825 | namespace: 'options' |
821 | 826 | }, { |
827 | + methodName: 'setCurrentUser', | |
828 | + method: (function (value) { | |
829 | + for (var key in value) { | |
830 | + if (value.hasOwnProperty(key)) { | |
831 | + Config.xmlData['user_' + key] = value[key]; | |
832 | + } | |
833 | + } | |
834 | + }) | |
835 | + }, { | |
822 | 836 | methodName: 'setTrackJQ', |
823 | 837 | variable: 'trackJQ', |
824 | 838 | namespace: 'options', | ... | ... |