Prevent unauthorized CMS access (#323) and enable use of GitHub Enterprise (#491)

* Prevent unauthorized CMS access and enable use of GitHub Enterprise
This commit is contained in:
tortilaman
2017-08-01 20:28:03 -07:00
committed by Benaiah Mischenko
parent b294110db7
commit 6805a6936d
6 changed files with 39 additions and 7 deletions

View File

@ -1,4 +1,7 @@
import { currentBackend } from '../backends/backend';
import { actions as notifActions } from 'redux-notifications';
const { notifSend } = notifActions;
export const AUTH_REQUEST = 'AUTH_REQUEST';
export const AUTH_SUCCESS = 'AUTH_SUCCESS';
@ -60,6 +63,11 @@ export function loginUser(credentials) {
dispatch(authenticate(user));
})
.catch((error) => {
dispatch(notifSend({
message: `${ error.message }`,
kind: 'warning',
dismissAfter: 8000,
}));
dispatch(authError(error));
});
};