Update check permisisons
This commit is contained in:
@@ -29,10 +29,7 @@
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('dialplan_add')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('dialplan_add')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -31,19 +31,16 @@
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('dialplan_edit')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('inbound_route_edit')
|
||||
|| permission_exists('outbound_route_add')
|
||||
|| permission_exists('outbound_route_edit')
|
||||
|| permission_exists('fifo_add')
|
||||
|| permission_exists('fifo_edit')
|
||||
|| permission_exists('time_condition_add')
|
||||
|| permission_exists('time_condition_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('dialplan_add')
|
||||
|| !permission_exists('dialplan_edit')
|
||||
|| !permission_exists('inbound_route_add')
|
||||
|| !permission_exists('inbound_route_edit')
|
||||
|| !permission_exists('outbound_route_add')
|
||||
|| !permission_exists('outbound_route_edit')
|
||||
|| !permission_exists('fifo_add')
|
||||
|| !permission_exists('fifo_edit')
|
||||
|| !permission_exists('time_condition_add')
|
||||
|| !permission_exists('time_condition_edit')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -30,10 +30,7 @@
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('dialplan_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('dialplan_edit')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -25,16 +25,13 @@
|
||||
*/
|
||||
|
||||
//includes files
|
||||
global $settings, $domain_uuid, $database;
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
global $settings, $domain_uuid, $database;
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('dialplan_view') || permission_exists('inbound_route_view') || permission_exists('outbound_route_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
if (!permission_exists('dialplan_view') || !permission_exists('inbound_route_view') || !permission_exists('outbound_route_view')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user