mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat: RBAC (#8922)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> Co-authored-by: Val <68596159+valya@users.noreply.github.com> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in> Co-authored-by: Valya Bullions <valya@n8n.io> Co-authored-by: Danny Martini <danny@n8n.io> Co-authored-by: Danny Martini <despair.blue@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: oleg <me@olegivaniv.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com> Co-authored-by: Elias Meire <elias@meire.dev> Co-authored-by: Giulio Andreini <andreini@netseven.it> Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: Ayato Hayashi <go12limchangyong@gmail.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import { middleware } from '@/rbac/middleware';
|
||||
import type { RouteConfig, RouterMiddleware } from '@/types/router';
|
||||
import { initializeCore } from '@/init';
|
||||
import { tryToParseNumber } from '@/utils/typesUtils';
|
||||
import { projectsRoutes } from '@/features/projects/projects.routes';
|
||||
|
||||
const ChangePasswordView = async () => await import('./views/ChangePasswordView.vue');
|
||||
const ErrorView = async () => await import('./views/ErrorView.vue');
|
||||
@@ -46,9 +47,7 @@ const TemplatesWorkflowView = async () => await import('@/views/TemplatesWorkflo
|
||||
const SetupWorkflowFromTemplateView = async () =>
|
||||
await import('@/views/SetupWorkflowFromTemplateView/SetupWorkflowFromTemplateView.vue');
|
||||
const TemplatesSearchView = async () => await import('@/views/TemplatesSearchView.vue');
|
||||
const CredentialsView = async () => await import('@/views/CredentialsView.vue');
|
||||
const ExecutionsView = async () => await import('@/views/ExecutionsView.vue');
|
||||
const WorkflowsView = async () => await import('@/views/WorkflowsView.vue');
|
||||
const VariablesView = async () => await import('@/views/VariablesView.vue');
|
||||
const SettingsUsageAndPlan = async () => await import('./views/SettingsUsageAndPlan.vue');
|
||||
const SettingsSso = async () => await import('./views/SettingsSso.vue');
|
||||
@@ -73,10 +72,7 @@ function getTemplatesRedirect(defaultRedirect: VIEWS[keyof VIEWS]) {
|
||||
export const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: VIEWS.HOMEPAGE,
|
||||
redirect: () => {
|
||||
return { name: VIEWS.WORKFLOWS };
|
||||
},
|
||||
redirect: '/home/workflows',
|
||||
meta: {
|
||||
middleware: ['authenticated'],
|
||||
},
|
||||
@@ -189,17 +185,6 @@ export const routes = [
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/credentials',
|
||||
name: VIEWS.CREDENTIALS,
|
||||
components: {
|
||||
default: CredentialsView,
|
||||
sidebar: MainSidebar,
|
||||
},
|
||||
meta: {
|
||||
middleware: ['authenticated'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/variables',
|
||||
name: VIEWS.VARIABLES,
|
||||
@@ -220,17 +205,6 @@ export const routes = [
|
||||
middleware: ['authenticated'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/workflows',
|
||||
name: VIEWS.WORKFLOWS,
|
||||
components: {
|
||||
default: WorkflowsView,
|
||||
sidebar: MainSidebar,
|
||||
},
|
||||
meta: {
|
||||
middleware: ['authenticated'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/workflow/:name/debug/:executionId',
|
||||
name: VIEWS.EXECUTION_DEBUG,
|
||||
@@ -731,6 +705,7 @@ export const routes = [
|
||||
},
|
||||
},
|
||||
},
|
||||
...projectsRoutes,
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
name: VIEWS.NOT_FOUND,
|
||||
|
||||
Reference in New Issue
Block a user