mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update check permisisons
This commit is contained in:
@@ -30,10 +30,7 @@
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('destination_export')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('destination_export')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -29,10 +29,7 @@
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('destination_add') || permission_exists('destination_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('destination_add') || !permission_exists('destination_edit')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
@@ -577,8 +574,8 @@
|
||||
if (isset($action_array[0]) && !empty($action_array[0])) {
|
||||
if ($destination->valid($action_array[0].':'.$action_array[1])) {
|
||||
//set variables from the action array
|
||||
$action_app = $action_array[0];
|
||||
$action_data = $action_array[1];
|
||||
$action_app = $action_array[0] ?? '';
|
||||
$action_data = $action_array[1] ?? '';
|
||||
|
||||
//allow specific api commands
|
||||
$allowed_commands = array();
|
||||
@@ -589,7 +586,7 @@
|
||||
}
|
||||
$action_data = xml::sanitize($action_data);
|
||||
foreach ($allowed_commands as $allowed_command) {
|
||||
$action_data = str_replace('#{'.$allowed_command, '${'.$allowed_command, $action_data);
|
||||
$action_data = str_replace('#{'.$allowed_command, '${'.$allowed_command, $action_data ?? '');
|
||||
}
|
||||
|
||||
//add the action to the dialplan xml
|
||||
|
||||
@@ -29,10 +29,7 @@
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('destination_import')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('destination_import')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -30,10 +30,7 @@
|
||||
//require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('destination_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('destination_view')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -30,10 +30,7 @@
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('destination_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('destination_view')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
@@ -65,12 +62,6 @@
|
||||
//process the http post data by action
|
||||
if (!empty($action) && !empty($destinations)) {
|
||||
switch ($action) {
|
||||
case 'toggle':
|
||||
if (permission_exists('destination_edit')) {
|
||||
$obj = new destinations;
|
||||
$obj->toggle($destinations);
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
if (permission_exists('destination_delete')) {
|
||||
$obj = new destinations;
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('destination_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('destination_view')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user