From 7d4b423219b3eba26823ecca596ab5a3c48792f9 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Fri, 25 Jun 2021 13:35:27 -0400 Subject: [PATCH] [devices] Add line port permission (#5981) --- app/devices/app_config.php | 4 ++++ app/devices/device_edit.php | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/devices/app_config.php b/app/devices/app_config.php index 22c3549470..de9b6d5087 100644 --- a/app/devices/app_config.php +++ b/app/devices/app_config.php @@ -121,6 +121,10 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "device_line_port"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "device_line_shared"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index f45281c94e..a2c0706271 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -976,7 +976,9 @@ if (permission_exists('device_line_password')) { echo " ".$text['label-password']."\n"; } - echo " ".$text['label-sip_port']."\n"; + if (permission_exists('device_line_port')) { + echo " ".$text['label-sip_port']."\n"; + } if (permission_exists('device_line_transport')) { echo " ".$text['label-sip_transport']."\n"; } @@ -1128,9 +1130,11 @@ echo " \n"; } - echo " \n"; - echo " \n"; - echo " \n"; + if (permission_exists('device_line_port')) { + echo " \n"; + echo " \n"; + echo " \n"; + } if (permission_exists('device_line_transport')) { echo " \n";