aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/app/utils/handleRequiredAuthentication.js6
-rw-r--r--server/sonar-web/src/main/js/store/appState/duck.js9
-rw-r--r--server/sonar-web/src/main/js/store/globalMessages/duck.js8
3 files changed, 0 insertions, 23 deletions
diff --git a/server/sonar-web/src/main/js/app/utils/handleRequiredAuthentication.js b/server/sonar-web/src/main/js/app/utils/handleRequiredAuthentication.js
index 453c970a69d..c3468d4ee64 100644
--- a/server/sonar-web/src/main/js/app/utils/handleRequiredAuthentication.js
+++ b/server/sonar-web/src/main/js/app/utils/handleRequiredAuthentication.js
@@ -18,17 +18,11 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
// @flow
-import getStore from './getStore';
import getHistory from './getHistory';
-import { requireAuthentication } from '../../store/appState/duck';
export default () => {
- const store = getStore();
const history = getHistory();
-
const returnTo = window.location.pathname + window.location.search + window.location.hash;
-
- store.dispatch(requireAuthentication());
history.replace({
pathname: '/sessions/new',
query: { 'return_to': returnTo }
diff --git a/server/sonar-web/src/main/js/store/appState/duck.js b/server/sonar-web/src/main/js/store/appState/duck.js
index cd313870e19..a9d2180dd03 100644
--- a/server/sonar-web/src/main/js/store/appState/duck.js
+++ b/server/sonar-web/src/main/js/store/appState/duck.js
@@ -31,7 +31,6 @@ export type Action = {
export const actions = {
SET_APP_STATE: 'SET_APP_STATE',
- REQUIRE_AUTHENTICATION: 'REQUIRE_AUTHENTICATION',
REQUIRE_AUTHORIZATION: 'REQUIRE_AUTHORIZATION'
};
@@ -40,10 +39,6 @@ export const setAppState = (appState: AppState): Action => ({
appState
});
-export const requireAuthentication = () => ({
- type: actions.REQUIRE_AUTHENTICATION
-});
-
export const requireAuthorization = () => ({
type: actions.REQUIRE_AUTHORIZATION
});
@@ -59,10 +54,6 @@ export default (state: AppState = defaultValue, action: Action) => {
return { ...state, ...action.appState };
}
- if (action.type === actions.REQUIRE_AUTHENTICATION) {
- return { ...state, authenticationError: true };
- }
-
if (action.type === actions.REQUIRE_AUTHORIZATION) {
return { ...state, authorizationError: true };
}
diff --git a/server/sonar-web/src/main/js/store/globalMessages/duck.js b/server/sonar-web/src/main/js/store/globalMessages/duck.js
index 38e92ca1693..57abed0977b 100644
--- a/server/sonar-web/src/main/js/store/globalMessages/duck.js
+++ b/server/sonar-web/src/main/js/store/globalMessages/duck.js
@@ -80,14 +80,6 @@ const globalMessages = (state: State = [], action: Action = {}) => {
level: action.level
}];
- case actions.REQUIRE_AUTHENTICATION:
- // FIXME l10n
- return [{
- id: uniqueId('global-message-'),
- message: 'Authentication required to see this page.',
- level: ERROR
- }];
-
case actions.REQUIRE_AUTHORIZATION:
// FIXME l10n
return [{