Skip to content

Commit ac26d58

Browse files
committed
allow web commands only for admin
1 parent ed7b2ef commit ac26d58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

interface/src/project/EMSESPDevicesForm.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ class EMSESPDevicesForm extends Component<EMSESPDevicesFormProps, EMSESPDevicesF
317317
renderDeviceData() {
318318
const { deviceData } = this.state;
319319
const { width } = this.props;
320+
const me = this.props.authenticatedContext.me;
320321

321322
if (this.noDevices()) {
322323
return;
@@ -350,7 +351,7 @@ class EMSESPDevicesForm extends Component<EMSESPDevicesFormProps, EMSESPDevicesF
350351
return (
351352
<TableRow hover key={i}>
352353
<TableCell padding="checkbox" style={{ width: 18 }} >
353-
{deviceData.data[i + 3] && (
354+
{deviceData.data[i + 3] && me.admin && (
354355
<IconButton edge="start" size="small" aria-label="Edit"
355356
onClick={() => this.sendCommand(i)}>
356357
<EditIcon fontSize="small" />

0 commit comments

Comments
 (0)