Commit 3a0066d38c2b0572f689d24b4afe25947b556af7
1 parent
04290491
Exists in
master
and in
1 other branch
Adds current user information to notifier.js
Showing
1 changed file
with
17 additions
and
3 deletions
Show diff stats
public/javascripts/notifier.js
| ... | ... | @@ -379,6 +379,11 @@ printStackTrace.implementation.prototype = { |
| 379 | 379 | '<project-root>{project_root}</project-root>' + |
| 380 | 380 | '<environment-name>{environment}</environment-name>' + |
| 381 | 381 | '</server-environment>' + |
| 382 | + '<current-user>' + | |
| 383 | + '<id>{user_id}</id>' + | |
| 384 | + '<name>{user_name}</name>' + | |
| 385 | + '<email>{user_email}</email>' + | |
| 386 | + '</current-user>' + | |
| 382 | 387 | '</notice>', |
| 383 | 388 | REQUEST_VARIABLE_GROUP_XML = '<{group_name}>{inner_content}</{group_name}>', |
| 384 | 389 | REQUEST_VARIABLE_XML = '<var key="{key}">{value}</var>', |
| ... | ... | @@ -411,9 +416,9 @@ printStackTrace.implementation.prototype = { |
| 411 | 416 | "rootDirectory": "{project_root}", |
| 412 | 417 | "action": "{request_action}", |
| 413 | 418 | |
| 414 | - "userId": "{}", | |
| 415 | - "userName": "{}", | |
| 416 | - "userEmail": "{}", | |
| 419 | + "userId": "{user_id}", | |
| 420 | + "userName": "{user_name}", | |
| 421 | + "userEmail": "{user_email}", | |
| 417 | 422 | }, |
| 418 | 423 | "environment": {}, |
| 419 | 424 | //"session": "", |
| ... | ... | @@ -683,6 +688,15 @@ printStackTrace.implementation.prototype = { |
| 683 | 688 | variable: 'outputFormat', |
| 684 | 689 | namespace: 'options' |
| 685 | 690 | }, { |
| 691 | + methodName: 'setCurrentUser', | |
| 692 | + method: (function (value) { | |
| 693 | + for (var key in value) { | |
| 694 | + if (value.hasOwnProperty(key)) { | |
| 695 | + Config.xmlData['user_' + key] = value[key]; | |
| 696 | + } | |
| 697 | + } | |
| 698 | + }) | |
| 699 | + }, { | |
| 686 | 700 | methodName: 'setTrackJQ', |
| 687 | 701 | variable: 'trackJQ', |
| 688 | 702 | namespace: 'options', | ... | ... |