From df01004fa5065a5add6bc97d51761d8ecfd0b6a0 Mon Sep 17 00:00:00 2001 From: fengyang_sy Date: Tue, 19 Nov 2019 06:44:05 -0800 Subject: [PATCH] [#54]Remove the create button in node page when the user is operator Signed-off-by: fengyang_sy --- src/dashboard/src/pages/Operator/Node/Node.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/dashboard/src/pages/Operator/Node/Node.js b/src/dashboard/src/pages/Operator/Node/Node.js index 4759c3619..ca156da0d 100644 --- a/src/dashboard/src/pages/Operator/Node/Node.js +++ b/src/dashboard/src/pages/Operator/Node/Node.js @@ -23,6 +23,7 @@ import moment from 'moment'; import PageHeaderWrapper from '@/components/PageHeaderWrapper'; import StandardTable from '@/components/StandardTable'; import styles from '../styles.less'; +import { getAuthority } from '@/utils/authority'; const FormItem = Form.Item; const { Option } = Select; @@ -350,6 +351,8 @@ class Node extends PureComponent { render() { const { selectedRows, registerUserFormVisible, targetNodeId } = this.state; + const userRole = getAuthority()[0]; + const { node: { nodes, pagination }, loadingNodes, @@ -485,9 +488,12 @@ class Node extends PureComponent {
- + { + userRole !== 'operator' && + + }