Commit dc6f6064 authored by Axel Bocciarelli's avatar Axel Bocciarelli

Fix regression in anonymous user detection

parent b8ce1662
Pipeline #32611 passed with stages
in 7 minutes and 31 seconds
......@@ -5,6 +5,7 @@ import {
LOG_IN,
LOG_OUT,
} from '../constants/actionTypes';
import ICAT from '../config/icat';
const initialState = {
username: null,
......@@ -42,7 +43,9 @@ const user = (state = initialState, action) => {
.format(),
name: action.name,
fullName: action.fullName,
isAnonymous: action.fullName === 'Anonymous',
isAnonymous:
ICAT.authentication.anonymous.enabled &&
state.username === ICAT.authentication.anonymous.username,
isAdministrator: action.isAdministrator,
};
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment