Compare commits

...

2 commits

Author SHA1 Message Date
Ricardo Espinoza 837345899e
remove custom middleware from SettingsSso route 2024-09-19 10:52:35 -04:00
Ricardo Espinoza 976e5d1008
fix typecheck issues 2024-09-19 10:26:49 -04:00
4 changed files with 3 additions and 11 deletions

View file

@ -1,14 +1,10 @@
import userEvent from '@testing-library/user-event';
import { createComponentRenderer } from '@/__tests__/render';
import { getDropdownItems, mockedStore } from '@/__tests__/utils';
import { createUser } from '@/__tests__/data/users';
import { useSettingsStore } from '@/stores/settings.store';
import { getDropdownItems } from '@/__tests__/utils';
import PersonalizationModal from '@/components/PersonalizationModal.vue';
import { useUsersStore } from '@/stores/users.store';
import { createTestingPinia } from '@pinia/testing';
import {
COMPANY_TYPE_KEY,
EMAIL_KEY,
COMPANY_INDUSTRY_EXTENDED_KEY,
OTHER_COMPANY_INDUSTRY_EXTENDED_KEY,
MARKETING_AUTOMATION_GOAL_KEY,

View file

@ -25,7 +25,6 @@ import {
TELECOMS_INDUSTRY,
OTHER_AUTOMATION_GOAL,
COMPANY_TYPE_KEY,
EMAIL_KEY,
SAAS_COMPANY_TYPE,
ECOMMERCE_COMPANY_TYPE,
MSP_INDUSTRY,
@ -85,7 +84,6 @@ import {
import { useToast } from '@/composables/useToast';
import Modal from '@/components/Modal.vue';
import type { IFormInputs, IPersonalizationLatestVersion } from '@/Interface';
import { useSettingsStore } from '@/stores/settings.store';
import { useRootStore } from '@/stores/root.store';
import { useUsersStore } from '@/stores/users.store';
import { createEventBus, createFormEventBus } from 'n8n-design-system/utils';

View file

@ -576,7 +576,7 @@ export const routes: RouteRecordRaw[] = [
settingsView: SettingsSso,
},
meta: {
middleware: ['authenticated', 'rbac', 'custom'],
middleware: ['authenticated', 'rbac'],
middlewareOptions: {
rbac: {
scope: 'saml:manage',

View file

@ -224,11 +224,9 @@ export const useUIStore = defineStore(STORES.UI, () => {
const contextBasedTranslationKeys = computed(() => {
const deploymentType = settingsStore.deploymentType;
let contextKey: '' | '.cloud' | '.desktop' = '';
let contextKey: '' | '.cloud' = '';
if (deploymentType === 'cloud') {
contextKey = '.cloud';
} else if (deploymentType === 'desktop_mac' || deploymentType === 'desktop_win') {
contextKey = '.desktop';
}
return {