summaryrefslogtreecommitdiffstats
path: root/web/react/components/access_history_modal.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/access_history_modal.jsx')
-rw-r--r--web/react/components/access_history_modal.jsx22
1 files changed, 13 insertions, 9 deletions
diff --git a/web/react/components/access_history_modal.jsx b/web/react/components/access_history_modal.jsx
index 65b80dfb7..165d32339 100644
--- a/web/react/components/access_history_modal.jsx
+++ b/web/react/components/access_history_modal.jsx
@@ -2,11 +2,11 @@
// See License.txt for license information.
var Modal = ReactBootstrap.Modal;
-var UserStore = require('../stores/user_store.jsx');
-var ChannelStore = require('../stores/channel_store.jsx');
-var AsyncClient = require('../utils/async_client.jsx');
-var LoadingScreen = require('./loading_screen.jsx');
-var Utils = require('../utils/utils.jsx');
+import UserStore from '../stores/user_store.jsx';
+import ChannelStore from '../stores/channel_store.jsx';
+import * as AsyncClient from '../utils/async_client.jsx';
+import LoadingScreen from './loading_screen.jsx';
+import * as Utils from '../utils/utils.jsx';
export default class AccessHistoryModal extends React.Component {
constructor(props) {
@@ -106,7 +106,7 @@ export default class AccessHistoryModal extends React.Component {
case '/channels/update_header':
currentAuditDesc = 'Updated the ' + channelName + ' channel/group header';
break;
- default:
+ default: {
let userIdField = [];
let userId = '';
let username = '';
@@ -130,11 +130,12 @@ export default class AccessHistoryModal extends React.Component {
break;
}
+ }
} else if (currentActionURL.indexOf('/oauth') === 0) {
const oauthInfo = currentAudit.extra_info.split(' ');
switch (currentActionURL) {
- case '/oauth/register':
+ case '/oauth/register': {
const clientIdField = oauthInfo[0].split('=');
if (clientIdField[0] === 'client_id') {
@@ -142,6 +143,7 @@ export default class AccessHistoryModal extends React.Component {
}
break;
+ }
case '/oauth/allow':
if (oauthInfo[0] === 'attempt') {
currentAuditDesc = 'Attempted to allow a new OAuth service access';
@@ -202,7 +204,7 @@ export default class AccessHistoryModal extends React.Component {
}
break;
- case '/users/update_roles':
+ case '/users/update_roles': {
const userRoles = userInfo[0].split('=')[1];
currentAuditDesc = 'Updated user role(s) to ';
@@ -213,7 +215,8 @@ export default class AccessHistoryModal extends React.Component {
}
break;
- case '/users/update_active':
+ }
+ case '/users/update_active': {
const updateType = userInfo[0].split('=')[0];
const updateField = userInfo[0].split('=')[1];
@@ -240,6 +243,7 @@ export default class AccessHistoryModal extends React.Component {
}
break;
+ }
case '/users/send_password_reset':
currentAuditDesc = 'Sent an email to ' + userInfo[0].split('=')[1] + ' to reset your password';
break;