aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-12-20 16:03:21 +0100
committerGitHub <noreply@github.com>2016-12-20 16:03:21 +0100
commita6c4efc432dfcdc37211fa843d2f3e06fe060c3d (patch)
treef35ef7e5cee1cfbcbba16c452de9aa26ebc9abad /server/sonar-web/src/main/js
parentf8941d21f5f38d5fed51350610b4b069bab4bb1e (diff)
downloadsonarqube-a6c4efc432dfcdc37211fa843d2f3e06fe060c3d.tar.gz
sonarqube-a6c4efc432dfcdc37211fa843d2f3e06fe060c3d.zip
do not display "authentication required" error message (#1478)
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 [{