diff --git a/spug_web/src/pages/host/Group.js b/spug_web/src/pages/host/Group.js
index 97b0d8b..524efb5 100644
--- a/spug_web/src/pages/host/Group.js
+++ b/spug_web/src/pages/host/Group.js
@@ -15,7 +15,7 @@ import {
ScissorOutlined
} from '@ant-design/icons';
import { LoadingOutlined } from '@ant-design/icons';
-import { http } from 'libs';
+import { hasPermission, http } from 'libs';
import store from './store';
import lds from 'lodash';
@@ -107,6 +107,13 @@ export default observer(function () {
setAction('')
}
+ function handleRightClick(v) {
+ if (hasPermission('host.group.edit')) {
+ store.group = v.node;
+ setVisible(true)
+ }
+ }
+
function handleExpand(keys, {_, node}) {
if (node.children.length > 0) {
setExpands(keys)
@@ -140,7 +147,12 @@ export default observer(function () {
}>
+ extra={}>
store.group = node}
onExpand={handleExpand}
onDrop={handleDrag}
- onRightClick={v => {
- store.group = v.node;
- setVisible(true)
- }}
+ onRightClick={handleRightClick}
/>