From c0ebdfda0a4783e4bceef9f6d4247f3ff7296ff6 Mon Sep 17 00:00:00 2001 From: leoliu Date: Wed, 12 Feb 2020 16:38:46 +0800 Subject: [PATCH] fix: Fix workspace redirect 404 rule --- src/components/Modals/ProjectSelect/index.jsx | 2 +- src/pages/workspaces/containers/layout.jsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Modals/ProjectSelect/index.jsx b/src/components/Modals/ProjectSelect/index.jsx index ed5031f4632..2d3cb3af068 100644 --- a/src/components/Modals/ProjectSelect/index.jsx +++ b/src/components/Modals/ProjectSelect/index.jsx @@ -120,7 +120,7 @@ export default class ProjectSelectModal extends React.Component { } if ( - globals.app.hasPermission({ module: 'workspaces', action: 'edit' }) || + globals.app.hasPermission({ module: 'workspaces', action: 'manage' }) || globals.app.hasPermission({ module: 'workspaces', action: 'view', diff --git a/src/pages/workspaces/containers/layout.jsx b/src/pages/workspaces/containers/layout.jsx index cc9ef2a74a3..ce98d76a095 100644 --- a/src/pages/workspaces/containers/layout.jsx +++ b/src/pages/workspaces/containers/layout.jsx @@ -67,6 +67,7 @@ class WorkspaceLayout extends Component { } if ( + !globals.app.hasPermission({ module: 'workspaces', action: 'manage' }) && !globals.app.hasPermission({ module: 'workspaces', action: 'view',