summaryrefslogtreecommitdiffstats
path: root/web/react/components/access_history_modal.jsx
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-10-14 15:10:50 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-10-14 15:10:50 -0700
commit04ddb3e1b3e4648790b396dba148cfae24a5802c (patch)
tree59f73a2eaf3e79daac41023a603b50e875f169b0 /web/react/components/access_history_modal.jsx
parent48c69b86d81b417a912c0bab0a28d39ca8c49cfd (diff)
downloadchat-04ddb3e1b3e4648790b396dba148cfae24a5802c.tar.gz
chat-04ddb3e1b3e4648790b396dba148cfae24a5802c.tar.bz2
chat-04ddb3e1b3e4648790b396dba148cfae24a5802c.zip
Properly handle missing session IDs regardless of case
Diffstat (limited to 'web/react/components/access_history_modal.jsx')
-rw-r--r--web/react/components/access_history_modal.jsx14
1 files changed, 9 insertions, 5 deletions
diff --git a/web/react/components/access_history_modal.jsx b/web/react/components/access_history_modal.jsx
index 58523feeb..909639859 100644
--- a/web/react/components/access_history_modal.jsx
+++ b/web/react/components/access_history_modal.jsx
@@ -330,11 +330,15 @@ export default class AccessHistoryModal extends React.Component {
);
if (this.state.moreInfo[i]) {
- if (!currentAudit.session_id && currentAudit.action.search('/users/login') !== -1) {
- if (currentAudit.extra_info === 'attempt') {
- currentAudit.session_id = 'N/A (Login attempt)';
- } else {
- currentAudit.session_id = 'N/A (Login failure)';
+ if (!currentAudit.session_id) {
+ currentAudit.session_id = 'N/A';
+
+ if (currentAudit.action.search('/users/login') >= 0) {
+ if (currentAudit.extra_info === 'attempt') {
+ currentAudit.session_id += ' (Login attempt)';
+ } else {
+ currentAudit.session_id += ' (Login failure)';
+ }
}
}