mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Fix "error connecting to n8n" error if not logged in (#18818)
This commit is contained in:
@@ -205,12 +205,14 @@ function registerAuthenticationHooks() {
|
||||
const npsSurveyStore = useNpsSurveyStore();
|
||||
const telemetry = useTelemetry();
|
||||
const RBACStore = useRBACStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
usersStore.registerLoginHook((user) => {
|
||||
RBACStore.setGlobalScopes(user.globalScopes ?? []);
|
||||
telemetry.identify(rootStore.instanceId, user.id);
|
||||
postHogStore.init(user.featureFlags);
|
||||
npsSurveyStore.setupNpsSurveyOnLogin(user.id, user.settings);
|
||||
void settingsStore.getModuleSettings();
|
||||
});
|
||||
|
||||
usersStore.registerLogoutHook(() => {
|
||||
|
||||
@@ -279,8 +279,6 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
||||
await getSettings();
|
||||
|
||||
initialized.value = true;
|
||||
|
||||
await getModuleSettings();
|
||||
};
|
||||
|
||||
const stopShowingSetupPage = () => {
|
||||
|
||||
@@ -136,10 +136,6 @@ const login = async (form: LoginRequestDto) => {
|
||||
loading.value = false;
|
||||
await settingsStore.getSettings();
|
||||
|
||||
if (settingsStore.activeModules.length > 0) {
|
||||
await settingsStore.getModuleSettings();
|
||||
}
|
||||
|
||||
toast.clearAllStickyNotifications();
|
||||
|
||||
if (settingsStore.isMFAEnforced && !usersStore.currentUser?.mfaAuthenticated) {
|
||||
|
||||
Reference in New Issue
Block a user