import { collectionAdminActionSet } from '~/views-components/context-menu/action-sets/collection-admin-action-set';
import { processResourceAdminActionSet } from '~/views-components/context-menu/action-sets/process-resource-admin-action-set';
import { projectAdminActionSet } from '~/views-components/context-menu/action-sets/project-admin-action-set';
-import { ACCOUNT_LINK_STATUS_KEY } from '~/services/link-account-service/link-account-service';
-import { cancelLinking } from '~/store/link-account-panel/link-account-panel-actions';
-import { matchTokenRoute } from '~/routes/routes';
console.log(`Starting arvados [${getBuildInfo()}]`);
});
const store = configureStore(history, services);
- // Cancel any link account ops in progess unless the user has
- // just logged in or there has been a successful link operation
- const data = sessionStorage.getItem(ACCOUNT_LINK_STATUS_KEY);
- if (!matchTokenRoute(history.location.pathname) && data === null) {
- store.dispatch<any>(cancelLinking());
- }
-
store.subscribe(initListener(history, store, services, config));
store.dispatch(initAuth(config));
store.dispatch(setBuildInfo());
import { Session } from "~/models/session";
import { Config } from '~/common/config';
import { initSessions } from "~/store/auth/auth-action-session";
-import { UserRepositoryCreate } from '~/views-components/dialog-create/dialog-user-create';
+import { cancelLinking } from '~/store/link-account-panel/link-account-panel-actions';
+import { matchTokenRoute } from '~/routes/routes';
export const authActions = unionize({
SAVE_API_TOKEN: ofType<string>(),
}
export const initAuth = (config: Config) => (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+ // Cancel any link account ops in progess unless the user has
+ // just logged in or there has been a successful link operation
+ const data = services.linkAccountService.getLinkOpStatus();
+ if (!matchTokenRoute(location.pathname) && data === undefined) {
+ dispatch<any>(cancelLinking());
+ }
+
const user = services.authService.getUser();
const token = services.authService.getApiToken();
if (token) {