Fix temporary permissions

This commit is contained in:
FusionPBX 2024-11-29 14:06:08 -07:00 committed by GitHub
parent 1b675c1b56
commit 8b7bd29456
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
131 changed files with 258 additions and 258 deletions

View File

@ -74,7 +74,7 @@
$array['access_controls'][0]['access_control_name'] = $access_control_name; $array['access_controls'][0]['access_control_name'] = $access_control_name;
$array['access_controls'][0]['access_control_default'] = $access_control_default; $array['access_controls'][0]['access_control_default'] = $access_control_default;
$p = new permissions; $p = permissions::new();
$p->add('access_control_add', 'temp'); $p->add('access_control_add', 'temp');
$database->app_name = 'access_controls'; $database->app_name = 'access_controls';
@ -106,7 +106,7 @@
$array['access_control_nodes'][0]['node_cidr'] = $node_cidr; $array['access_control_nodes'][0]['node_cidr'] = $node_cidr;
$array['access_control_nodes'][0]['node_description'] = $node_description; $array['access_control_nodes'][0]['node_description'] = $node_description;
$p = new permissions; $p = permissions::new();
$p->add('access_control_node_add', 'temp'); $p->add('access_control_node_add', 'temp');
$database->app_name = 'access_controls'; $database->app_name = 'access_controls';

View File

@ -69,7 +69,7 @@ if (!class_exists('access_controls')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('access_control_node_delete', 'temp'); $p->add('access_control_node_delete', 'temp');
//execute delete //execute delete
@ -236,7 +236,7 @@ if (!class_exists('access_controls')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('access_control_node_add', 'temp'); $p->add('access_control_node_add', 'temp');
//save the array //save the array

View File

@ -65,7 +65,7 @@
//update the status //update the status
if (permission_exists("user_setting_edit")) { if (permission_exists("user_setting_edit")) {
//add the user_edit permission //add the user_edit permission
$p = new permissions; $p = permissions::new();
$p->add("user_edit", "temp"); $p->add("user_edit", "temp");
//update the database user_status //update the database user_status
@ -153,7 +153,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
//execute update //execute update

View File

@ -166,7 +166,7 @@
$array['dialplans'][$index]['dialplan_enabled'] = 'true'; $array['dialplans'][$index]['dialplan_enabled'] = 'true';
} }
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
$database->save($array); $database->save($array);

View File

@ -435,7 +435,7 @@ if (!class_exists('call_block')) {
unset($rows, $parameters); unset($rows, $parameters);
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array

View File

@ -58,7 +58,7 @@ if ($domains_processed == 1) {
} }
if (!empty($array)) { if (!empty($array)) {
$p = new permissions; $p = permissions::new();
$p->add('call_center_tier_edit', 'temp'); $p->add('call_center_tier_edit', 'temp');
$database->app_name = 'call_centers'; $database->app_name = 'call_centers';
@ -168,7 +168,7 @@ if ($domains_processed == 1) {
//save the array to the database //save the array to the database
if (!empty($array)) { if (!empty($array)) {
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -172,7 +172,7 @@
$array['users'][0]['user_status'] = $row['agent_status']; $array['users'][0]['user_status'] = $row['agent_status'];
$array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; $array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$p = new permissions; $p = permissions::new();
$p->add('user_edit', 'temp'); $p->add('user_edit', 'temp');
$database = new database; $database = new database;

View File

@ -178,7 +178,7 @@
$array['call_center_tiers'][0]['call_center_tier_uuid'] = $call_center_tier_uuid; $array['call_center_tiers'][0]['call_center_tier_uuid'] = $call_center_tier_uuid;
$array['call_center_tiers'][0]['domain_uuid'] = $domain_uuid; $array['call_center_tiers'][0]['domain_uuid'] = $domain_uuid;
$p = new permissions; $p = permissions::new();
$p->add('call_center_tier_delete', 'temp'); $p->add('call_center_tier_delete', 'temp');
$database = new database; $database = new database;
@ -434,7 +434,7 @@
$array['dialplans'][0]["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370"; $array['dialplans'][0]["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370";
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -78,7 +78,7 @@
$array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid; $array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
@ -216,7 +216,7 @@
$array["dialplans"][0] = $dialplan; $array["dialplans"][0] = $dialplan;
//add temporary permissions //add temporary permissions
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", 'temp'); $p->add("dialplan_add", 'temp');
$p->add("dialplan_detail_add", 'temp'); $p->add("dialplan_detail_add", 'temp');
$p->add("dialplan_edit", 'temp'); $p->add("dialplan_edit", 'temp');
@ -242,7 +242,7 @@
$array['call_center_queues'][0]['dialplan_uuid'] = $this->dialplan_uuid; $array['call_center_queues'][0]['dialplan_uuid'] = $this->dialplan_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('call_center_queue_edit', 'temp'); $p->add('call_center_queue_edit', 'temp');
//execute update //execute update
@ -349,7 +349,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('call_center_tier_delete', 'temp'); $p->add('call_center_tier_delete', 'temp');
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
@ -446,7 +446,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('call_center_tier_delete', 'temp'); $p->add('call_center_tier_delete', 'temp');
//execute delete //execute delete
@ -578,7 +578,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('call_center_tier_add', 'temp'); $p->add('call_center_tier_add', 'temp');
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');

View File

@ -237,7 +237,7 @@
$array["call_flows"][$i]["call_flow_description"] = $call_flow_description; $array["call_flows"][$i]["call_flow_description"] = $call_flow_description;
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -121,7 +121,7 @@ if (!class_exists('call_flows')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
@ -223,7 +223,7 @@ if (!class_exists('call_flows')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -374,7 +374,7 @@ if (!class_exists('call_flows')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
//save the array //save the array

View File

@ -248,7 +248,7 @@
} }
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("extension_edit", "temp"); $p->add("extension_edit", "temp");
//save the data //save the data

View File

@ -89,7 +89,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('extension_add', 'temp'); $p->add('extension_add', 'temp');
//execute update //execute update
@ -214,7 +214,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
//save the array //save the array

View File

@ -95,7 +95,7 @@
$array['extensions'][0]['do_not_disturb'] = $this->enabled; $array['extensions'][0]['do_not_disturb'] = $this->enabled;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
//execute update //execute update
@ -226,7 +226,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
//save the array //save the array

View File

@ -91,7 +91,7 @@
$array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled; $array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled;
$array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy; $array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('follow_me_add', 'temp'); $p->add('follow_me_add', 'temp');
//execute insert //execute insert
$database = new database; $database = new database;
@ -115,7 +115,7 @@
$array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled; $array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled;
$array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy; $array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('follow_me_add', 'temp'); $p->add('follow_me_add', 'temp');
//execute update //execute update
$database = new database; $database = new database;
@ -135,7 +135,7 @@
//delete related follow me destinations //delete related follow me destinations
$array['follow_me_destinations'][0]['follow_me_uuid'] = $this->follow_me_uuid; $array['follow_me_destinations'][0]['follow_me_uuid'] = $this->follow_me_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('follow_me_destination_delete', 'temp'); $p->add('follow_me_destination_delete', 'temp');
//execute delete //execute delete
$database = new database; $database = new database;
@ -210,7 +210,7 @@
} }
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('follow_me_destination_add', 'temp'); $p->add('follow_me_destination_add', 'temp');
//execute insert //execute insert
$database = new database; $database = new database;
@ -234,7 +234,7 @@
$extension_uuid = $result[0]['extension_uuid']; $extension_uuid = $result[0]['extension_uuid'];
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add("follow_me_edit", 'temp'); $p->add("follow_me_edit", 'temp');
$p->add("extension_edit", 'temp'); $p->add("extension_edit", 'temp');
@ -389,7 +389,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
$p->add('follow_me_edit', 'temp'); $p->add('follow_me_edit', 'temp');

View File

@ -110,7 +110,7 @@ if (!class_exists('call_recordings')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//add temporary permissions //add temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('xml_cdr_edit', 'temp'); $p->add('xml_cdr_edit', 'temp');
//remove record_path, record_name and record_length //remove record_path, record_name and record_length
@ -200,7 +200,7 @@ if (!class_exists('call_recordings')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//add temporary permissions //add temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('xml_cdr_edit', 'temp'); $p->add('xml_cdr_edit', 'temp');
//remove record_path, record_name and record_length //remove record_path, record_name and record_length

View File

@ -164,7 +164,7 @@
$array['dialplans'][0]["app_uuid"] = "b81412e8-7253-91f4-e48e-42fc2c9a38d9"; $array['dialplans'][0]["app_uuid"] = "b81412e8-7253-91f4-e48e-42fc2c9a38d9";
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -188,7 +188,7 @@
$array['conference_room_users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; $array['conference_room_users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
//un-assigne the users from the conference room //un-assigne the users from the conference room
$p = new permissions; $p = permissions::new();
$p->add('conference_room_user_delete', 'temp'); $p->add('conference_room_user_delete', 'temp');
$database->app_name = 'conference_centers'; $database->app_name = 'conference_centers';
@ -358,7 +358,7 @@
$array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid; $array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid;
$array['conference_room_users'][0]['user_uuid'] = $_SESSION["user_uuid"]; $array['conference_room_users'][0]['user_uuid'] = $_SESSION["user_uuid"];
$p = new permissions; $p = permissions::new();
$p->add('conference_room_user_add', 'temp'); $p->add('conference_room_user_add', 'temp');
$database->app_name = 'conference_centers'; $database->app_name = 'conference_centers';
@ -440,7 +440,7 @@
$array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid; $array['conference_room_users'][0]['conference_room_uuid'] = $conference_room_uuid;
$array['conference_room_users'][0]['user_uuid'] = $user_uuid; $array['conference_room_users'][0]['user_uuid'] = $user_uuid;
$p = new permissions; $p = permissions::new();
$p->add('conference_room_user_add', 'temp'); $p->add('conference_room_user_add', 'temp');
$database->app_name = 'conference_centers'; $database->app_name = 'conference_centers';

View File

@ -349,7 +349,7 @@ if (!class_exists('conference_centers')) {
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
@ -425,7 +425,7 @@ if (!class_exists('conference_centers')) {
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('conference_room_user_delete', 'temp'); $p->add('conference_room_user_delete', 'temp');
$p->add('conference_room_delete', 'temp'); $p->add('conference_room_delete', 'temp');
@ -489,7 +489,7 @@ if (!class_exists('conference_centers')) {
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('conference_session_detail_delete', 'temp'); $p->add('conference_session_detail_delete', 'temp');
$p->add('conference_user_delete', 'temp'); $p->add('conference_user_delete', 'temp');
@ -578,7 +578,7 @@ if (!class_exists('conference_centers')) {
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");
//save the array //save the array

View File

@ -65,7 +65,7 @@
$array['conference_controls'][0]['control_name'] = $control_name; $array['conference_controls'][0]['control_name'] = $control_name;
$array['conference_controls'][0]['control_enabled'] = 'true'; $array['conference_controls'][0]['control_enabled'] = 'true';
$p = new permissions; $p = permissions::new();
$p->add('conference_control_add', 'temp'); $p->add('conference_control_add', 'temp');
$database->app_name = 'conference_controls'; $database->app_name = 'conference_controls';
@ -96,7 +96,7 @@
} }
$array['conference_control_details'][0]['control_enabled'] = $control_enabled; $array['conference_control_details'][0]['control_enabled'] = $control_enabled;
$p = new permissions; $p = permissions::new();
$p->add('conference_control_detail_add', 'temp'); $p->add('conference_control_detail_add', 'temp');
$database->app_name = 'conference_controls'; $database->app_name = 'conference_controls';

View File

@ -103,7 +103,7 @@ if (!class_exists('conference_controls')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('conference_control_detail_delete', 'temp'); $p->add('conference_control_detail_delete', 'temp');
//execute delete //execute delete

View File

@ -65,7 +65,7 @@
$array['conference_profiles'][0]['profile_name'] = $profile_name; $array['conference_profiles'][0]['profile_name'] = $profile_name;
$array['conference_profiles'][0]['profile_enabled'] = 'true'; $array['conference_profiles'][0]['profile_enabled'] = 'true';
$p = new permissions; $p = permissions::new();
$p->add('conference_profile_add', 'temp'); $p->add('conference_profile_add', 'temp');
$database->app_name = 'conference_profiles'; $database->app_name = 'conference_profiles';
@ -91,7 +91,7 @@
$array['conference_profile_params'][0]['profile_param_value'] = $profile_param_value; $array['conference_profile_params'][0]['profile_param_value'] = $profile_param_value;
$array['conference_profile_params'][0]['profile_param_enabled'] = $profile_param_enabled; $array['conference_profile_params'][0]['profile_param_enabled'] = $profile_param_enabled;
$p = new permissions; $p = permissions::new();
$p->add('conference_profile_param_add', 'temp'); $p->add('conference_profile_param_add', 'temp');
$database->app_name = 'conference_profiles'; $database->app_name = 'conference_profiles';

View File

@ -103,7 +103,7 @@ if (!class_exists('conference_profiles')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('conference_profile_param_delete', 'temp'); $p->add('conference_profile_param_delete', 'temp');
//execute delete //execute delete
@ -410,7 +410,7 @@ if (!class_exists('conference_profiles')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('conference_profile_param_add', 'temp'); $p->add('conference_profile_param_add', 'temp');
//save the array //save the array

View File

@ -91,7 +91,7 @@
$user_uuid = $_REQUEST["user_uuid"]; $user_uuid = $_REQUEST["user_uuid"];
$conference_uuid = $_REQUEST["id"]; $conference_uuid = $_REQUEST["id"];
$p = new permissions; $p = permissions::new();
$p->add('conference_user_delete', 'temp'); $p->add('conference_user_delete', 'temp');
$array['conference_users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; $array['conference_users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
@ -124,7 +124,7 @@
$array['conference_users'][0]['conference_uuid'] = $conference_uuid; $array['conference_users'][0]['conference_uuid'] = $conference_uuid;
$array['conference_users'][0]['user_uuid'] = $user_uuid; $array['conference_users'][0]['user_uuid'] = $user_uuid;
$p = new permissions; $p = permissions::new();
$p->add('conference_user_add', 'temp'); $p->add('conference_user_add', 'temp');
$database = new database; $database = new database;
@ -239,7 +239,7 @@
$array['dialplans'][0]['dialplan_enabled'] = $conference_enabled; $array['dialplans'][0]['dialplan_enabled'] = $conference_enabled;
$array['dialplans'][0]['dialplan_description'] = $conference_description; $array['dialplans'][0]['dialplan_description'] = $conference_description;
$p = new permissions; $p = permissions::new();
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');

View File

@ -108,7 +108,7 @@ if (!class_exists('conferences')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('conference_user_delete', 'temp'); $p->add('conference_user_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
@ -203,7 +203,7 @@ if (!class_exists('conferences')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -341,7 +341,7 @@ if (!class_exists('conferences')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('conference_user_add', 'temp'); $p->add('conference_user_add', 'temp');
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');

View File

@ -131,7 +131,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = new permissions; $p = permissions::new();
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

@ -545,7 +545,7 @@
//save the data //save the data
if (!empty($array)) { if (!empty($array)) {
//add the permission object //add the permission object
$p = new permissions; $p = permissions::new();
$p->add('contact_add', 'temp'); $p->add('contact_add', 'temp');
$p->add('contact_phone_add', 'temp'); $p->add('contact_phone_add', 'temp');
$p->add('contact_address_add', 'temp'); $p->add('contact_address_add', 'temp');

View File

@ -112,7 +112,7 @@ if (!empty($_GET["contact_uuid"]) && is_uuid($_GET["contact_uuid"])) {
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = new permissions; $p = permissions::new();
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

@ -107,7 +107,7 @@ if ($_POST['a'] == 'import') {
unset($duplicate_contact_uuid); unset($duplicate_contact_uuid);
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('contact_delete', 'temp'); $p->add('contact_delete', 'temp');
//delete duplicate contact //delete duplicate contact

View File

@ -102,7 +102,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = new permissions; $p = permissions::new();
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

@ -132,7 +132,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = new permissions; $p = permissions::new();
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

@ -110,7 +110,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = new permissions; $p = permissions::new();
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

@ -129,7 +129,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = new permissions; $p = permissions::new();
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

@ -102,7 +102,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = new permissions; $p = permissions::new();
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

@ -115,7 +115,7 @@
$array['contacts'][0]['last_mod_date'] = 'now()'; $array['contacts'][0]['last_mod_date'] = 'now()';
$array['contacts'][0]['last_mod_user'] = $_SESSION['username']; $array['contacts'][0]['last_mod_user'] = $_SESSION['username'];
$p = new permissions; $p = permissions::new();
$p->add('contact_edit', 'temp'); $p->add('contact_edit', 'temp');
$database = new database; $database = new database;

View File

@ -108,7 +108,7 @@ if (!class_exists('contacts')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temp permissions //grant temp permissions
$p = new permissions; $p = permissions::new();
$database = new database; $database = new database;
foreach ($this->tables as $table) { foreach ($this->tables as $table) {
$p->add(database::singular($table).'_delete', 'temp'); $p->add(database::singular($table).'_delete', 'temp');

View File

@ -83,7 +83,7 @@ if ($domains_processed == 1) {
//save to the data //save to the data
if (!empty($array)) { if (!empty($array)) {
//add temporary permissions //add temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('destination_edit', 'temp'); $p->add('destination_edit', 'temp');
//create the database object and save the data //create the database object and save the data
@ -109,7 +109,7 @@ if ($domains_processed == 1) {
if (!empty($array)) { if (!empty($array)) {
//add temporary permissions //add temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('destination_edit', 'temp'); $p->add('destination_edit', 'temp');
//create the database object and save the data //create the database object and save the data

View File

@ -1139,7 +1139,7 @@
} }
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", 'temp'); $p->add("dialplan_add", 'temp');
$p->add("dialplan_detail_add", 'temp'); $p->add("dialplan_detail_add", 'temp');
$p->add("dialplan_edit", 'temp'); $p->add("dialplan_edit", 'temp');

View File

@ -1081,7 +1081,7 @@ if (!class_exists('destinations')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');

View File

@ -62,7 +62,7 @@ if ($domains_processed == 1) {
$array['device_keys'][$index]['device_key_vendor'] = $row["device_vendor"]; $array['device_keys'][$index]['device_key_vendor'] = $row["device_vendor"];
} }
if (is_array($array) && @sizeof($array)) { if (is_array($array) && @sizeof($array)) {
$p = new permissions; $p = permissions::new();
$p->add('device_key_edit', 'temp'); $p->add('device_key_edit', 'temp');
$database->app_name = 'devices'; $database->app_name = 'devices';
@ -106,7 +106,7 @@ if ($domains_processed == 1) {
//save the array //save the array
if (!empty($array)) { if (!empty($array)) {
$p = new permissions; $p = permissions::new();
$p->add('device_profile_key_add', 'temp'); $p->add('device_profile_key_add', 'temp');
$database->app_name = 'devices'; $database->app_name = 'devices';
@ -144,7 +144,7 @@ if ($domains_processed == 1) {
//save the array //save the array
if (!empty($array)) { if (!empty($array)) {
$p = new permissions; $p = permissions::new();
$p->add('device_profile_setting_add', 'temp'); $p->add('device_profile_setting_add', 'temp');
$database->app_name = 'devices'; $database->app_name = 'devices';
@ -225,7 +225,7 @@ if ($domains_processed == 1) {
//execute //execute
if (!empty($array)) { if (!empty($array)) {
$p = new permissions; $p = permissions::new();
$p->add('device_vendor_add', 'temp'); $p->add('device_vendor_add', 'temp');
$p->add('device_vendor_function_add', 'temp'); $p->add('device_vendor_function_add', 'temp');
$p->add('device_vendor_function_group_add', 'temp'); $p->add('device_vendor_function_group_add', 'temp');

View File

@ -44,7 +44,7 @@
//delete the device vendor function group //delete the device vendor function group
$array['device_vendor_function_groups'][0]['device_vendor_function_group_uuid'] = $device_vendor_function_group_uuid; $array['device_vendor_function_groups'][0]['device_vendor_function_group_uuid'] = $device_vendor_function_group_uuid;
$p = new permissions; $p = permissions::new();
$p->add('device_vendor_function_group_delete', 'temp'); $p->add('device_vendor_function_group_delete', 'temp');
$database = new database; $database = new database;
@ -183,7 +183,7 @@
$array['device_vendor_function_groups'][0]['group_name'] = $group_name; $array['device_vendor_function_groups'][0]['group_name'] = $group_name;
$array['device_vendor_function_groups'][0]['group_uuid'] = $group_uuid; $array['device_vendor_function_groups'][0]['group_uuid'] = $group_uuid;
$p = new permissions; $p = permissions::new();
$p->add('device_vendor_function_group_add', 'temp'); $p->add('device_vendor_function_group_add', 'temp');
$database = new database; $database = new database;

View File

@ -129,7 +129,7 @@
} }
//assign temp permissions //assign temp permissions
$p = new permissions; $p = permissions::new();
$p->add('device_vendor_add', 'temp'); $p->add('device_vendor_add', 'temp');
$p->add('device_vendor_function_add', 'temp'); $p->add('device_vendor_function_add', 'temp');
$p->add('device_vendor_function_group_add', 'temp'); $p->add('device_vendor_function_group_add', 'temp');

View File

@ -512,7 +512,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('device_setting_delete', 'temp'); $p->add('device_setting_delete', 'temp');
$p->add('device_line_delete', 'temp'); $p->add('device_line_delete', 'temp');
$p->add('device_key_delete', 'temp'); $p->add('device_key_delete', 'temp');
@ -722,7 +722,7 @@
if (!empty($array) && is_array($array) && @sizeof($array) != 0) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('device_vendor_function_delete', 'temp'); $p->add('device_vendor_function_delete', 'temp');
$p->add('device_vendor_function_group_delete', 'temp'); $p->add('device_vendor_function_group_delete', 'temp');
@ -784,7 +784,7 @@
if (!empty($array) && is_array($array) && @sizeof($array) != 0) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('device_vendor_function_group_delete', 'temp'); $p->add('device_vendor_function_group_delete', 'temp');
//execute delete //execute delete
@ -845,7 +845,7 @@
if (!empty($array) && is_array($array) && @sizeof($array) != 0) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('device_profile_key_delete', 'temp'); $p->add('device_profile_key_delete', 'temp');
$p->add('device_profile_setting_delete', 'temp'); $p->add('device_profile_setting_delete', 'temp');
@ -1370,7 +1370,7 @@
if (!empty($array) && is_array($array) && @sizeof($array) != 0) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('device_profile_key_add', 'temp'); $p->add('device_profile_key_add', 'temp');
$p->add('device_profile_setting_add', 'temp'); $p->add('device_profile_setting_add', 'temp');

View File

@ -259,7 +259,7 @@
} }
if ($save) { if ($save) {
//add the temporary permissions //add the temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('device_keys_add', 'temp'); $p->add('device_keys_add', 'temp');
$p->add('device_key_edit', 'temp'); $p->add('device_key_edit', 'temp');

View File

@ -402,7 +402,7 @@
//update the destination dialplan_uuid //update the destination dialplan_uuid
if (is_uuid($destination_uuid)) { if (is_uuid($destination_uuid)) {
$p = new permissions; $p = permissions::new();
$p->add('destination_edit', 'temp'); $p->add('destination_edit', 'temp');
$array['destinations'][0]['destination_uuid'] = $destination_uuid; $array['destinations'][0]['destination_uuid'] = $destination_uuid;

View File

@ -815,7 +815,7 @@
} }
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_detail_add", "temp"); $p->add("dialplan_detail_add", "temp");

View File

@ -170,7 +170,7 @@
$array['dialplan_details'][1]['dialplan_detail_data'] = 'WARNING [inbound routes] 404 not found \${sip_network_ip}'; $array['dialplan_details'][1]['dialplan_detail_data'] = 'WARNING [inbound routes] 404 not found \${sip_network_ip}';
$array['dialplan_details'][1]['dialplan_detail_order'] = '20'; $array['dialplan_details'][1]['dialplan_detail_order'] = '20';
$p = new permissions; $p = permissions::new();
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
$p->add('dialplan_detail_add', 'temp'); $p->add('dialplan_detail_add', 'temp');

View File

@ -111,7 +111,7 @@
$array['dialplans'][0]['dialplan_description'] = $this->dialplan_description; $array['dialplans'][0]['dialplan_description'] = $this->dialplan_description;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
//execute insert //execute insert
@ -144,7 +144,7 @@
$array['dialplans'][0]['dialplan_description'] = $this->dialplan_description; $array['dialplans'][0]['dialplan_description'] = $this->dialplan_description;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//execute update //execute update
@ -447,7 +447,7 @@
} //end foreach $xml_list } //end foreach $xml_list
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
$p->add('dialplan_detail_add', 'temp'); $p->add('dialplan_detail_add', 'temp');
@ -1007,7 +1007,7 @@
$array['dialplans'][$x]['dialplan_uuid'] = $key; $array['dialplans'][$x]['dialplan_uuid'] = $key;
$array['dialplans'][$x]['dialplan_xml'] = $value; $array['dialplans'][$x]['dialplan_xml'] = $value;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//execute update //execute update
$database = new database; $database = new database;
@ -1160,7 +1160,7 @@
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
@ -1264,7 +1264,7 @@
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
//execute delete //execute delete
@ -1371,7 +1371,7 @@
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -1525,7 +1525,7 @@
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_detail_add', 'temp'); $p->add('dialplan_detail_add', 'temp');
//save the array //save the array

View File

@ -124,7 +124,7 @@
$array['dialplans'][0]['dialplan_description'] = $this->dialplan_description; $array['dialplans'][0]['dialplan_description'] = $this->dialplan_description;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
//execute insert //execute insert
@ -156,7 +156,7 @@
$array['dialplans'][0]['dialplan_description'] = $this->dialplan_description; $array['dialplans'][0]['dialplan_description'] = $this->dialplan_description;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//execute update //execute update
@ -452,7 +452,7 @@
} //end foreach $xml_list } //end foreach $xml_list
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
$p->add('dialplan_detail_add', 'temp'); $p->add('dialplan_detail_add', 'temp');
@ -1065,7 +1065,7 @@
$array['dialplans'][$x]['dialplan_xml'] = $value; $array['dialplans'][$x]['dialplan_xml'] = $value;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//execute update //execute update
@ -1188,7 +1188,7 @@
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
@ -1290,7 +1290,7 @@
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
//execute delete //execute delete
@ -1395,7 +1395,7 @@
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -1546,7 +1546,7 @@
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_detail_add', 'temp'); $p->add('dialplan_detail_add', 'temp');
//save the array //save the array

View File

@ -443,7 +443,7 @@
$array['email_queue'][0]['email_status'] = 'sent'; $array['email_queue'][0]['email_status'] = 'sent';
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('email_queue_add', 'temp'); $p->add('email_queue_add', 'temp');
$p->add('email_queue_update', 'temp'); $p->add('email_queue_update', 'temp');
//execute insert //execute insert
@ -474,7 +474,7 @@
$array['email_queue'][0]['email_status'] = 'failed'; $array['email_queue'][0]['email_status'] = 'failed';
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('email_queue_add', 'temp'); $p->add('email_queue_add', 'temp');
//execute insert //execute insert
@ -528,7 +528,7 @@
$array['email_logs'][0]['status'] = 'failed'; $array['email_logs'][0]['status'] = 'failed';
$array['email_logs'][0]['email'] = str_replace("'", "''", $msg); $array['email_logs'][0]['email'] = str_replace("'", "''", $msg);
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('email_log_add', 'temp'); $p->add('email_log_add', 'temp');
//execute insert //execute insert
$database->app_name = 'v_mailto'; $database->app_name = 'v_mailto';

View File

@ -579,7 +579,7 @@
//add the missing email templates //add the missing email templates
if (!empty($array['email_templates'])) { if (!empty($array['email_templates'])) {
//add the temporary permission //add the temporary permission
$p = new permissions; $p = permissions::new();
$p->add("email_template_add", 'temp'); $p->add("email_template_add", 'temp');
$p->add("email_template_edit", 'temp'); $p->add("email_template_edit", 'temp');

View File

@ -229,7 +229,7 @@
$x++; $x++;
} }
if (is_array($array)) { if (is_array($array)) {
$p = new permissions; $p = permissions::new();
$p->add('event_guard_log_edit', 'temp'); $p->add('event_guard_log_edit', 'temp');
$database->app_name = 'event guard'; $database->app_name = 'event guard';
$database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637'; $database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637';
@ -349,7 +349,7 @@
$array['event_guard_logs'][0]['extension'] = $event['to-user'].'@'.$event['to-host']; $array['event_guard_logs'][0]['extension'] = $event['to-user'].'@'.$event['to-host'];
$array['event_guard_logs'][0]['user_agent'] = $event['user-agent']; $array['event_guard_logs'][0]['user_agent'] = $event['user-agent'];
$array['event_guard_logs'][0]['log_status'] = 'blocked'; $array['event_guard_logs'][0]['log_status'] = 'blocked';
$p = new permissions; $p = permissions::new();
$p->add('event_guard_log_add', 'temp'); $p->add('event_guard_log_add', 'temp');
$database->app_name = 'event guard'; $database->app_name = 'event guard';
$database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637'; $database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637';

View File

@ -50,7 +50,7 @@
} }
} }
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
$p = new permissions; $p = permissions::new();
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
$database->app_name = 'extensions'; $database->app_name = 'extensions';
@ -69,7 +69,7 @@
$sql .= "where default_setting_category = 'security' "; $sql .= "where default_setting_category = 'security' ";
$sql .= "and default_setting_subcategory like 'password_%' "; $sql .= "and default_setting_subcategory like 'password_%' ";
$p = new permissions; $p = permissions::new();
$p->add('default_setting_edit', 'temp'); $p->add('default_setting_edit', 'temp');
$database->execute($sql); $database->execute($sql);

View File

@ -261,7 +261,7 @@
$array['extension_users'][0]['user_uuid'] = $user_uuid; $array['extension_users'][0]['user_uuid'] = $user_uuid;
//add temporary permission //add temporary permission
$p = new permissions; $p = permissions::new();
$p->add('extension_user_delete', 'temp'); $p->add('extension_user_delete', 'temp');
//save the array //save the array
@ -288,7 +288,7 @@
$array['device_lines'][0]['device_line_uuid'] = $device_line_uuid; $array['device_lines'][0]['device_line_uuid'] = $device_line_uuid;
//add temporary permission //add temporary permission
$p = new permissions; $p = permissions::new();
$p->add('device_line_delete', 'temp'); $p->add('device_line_delete', 'temp');
//save the array //save the array

View File

@ -153,7 +153,7 @@ if (!class_exists('extension')) {
//build update array //build update array
$array['voicemails'][0]['voicemail_uuid'] = $voicemail_uuid; $array['voicemails'][0]['voicemail_uuid'] = $voicemail_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_edit', 'temp'); $p->add('voicemail_edit', 'temp');
} }
else { else {
@ -161,7 +161,7 @@ if (!class_exists('extension')) {
$array['voicemails'][0]['voicemail_uuid'] = uuid(); $array['voicemails'][0]['voicemail_uuid'] = uuid();
$array['voicemails'][0]['domain_uuid'] = $this->domain_uuid; $array['voicemails'][0]['domain_uuid'] = $this->domain_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_add', 'temp'); $p->add('voicemail_add', 'temp');
} }
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
@ -639,7 +639,7 @@ if (!class_exists('extension')) {
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('extension_user_delete', 'temp'); $p->add('extension_user_delete', 'temp');
$p->add('follow_me_delete', 'temp'); $p->add('follow_me_delete', 'temp');
$p->add('follow_me_destination_delete', 'temp'); $p->add('follow_me_destination_delete', 'temp');
@ -743,7 +743,7 @@ if (!class_exists('extension')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('extension_edit', 'temp'); $p->add('extension_edit', 'temp');
//save the array //save the array

View File

@ -89,7 +89,7 @@
$array_temp = $array; $array_temp = $array;
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("extension_edit", "temp"); $p->add("extension_edit", "temp");
//save to the data //save to the data

View File

@ -202,7 +202,7 @@
//add the missing email templates //add the missing email templates
if (!empty($array['email_templates'])) { if (!empty($array['email_templates'])) {
//add the temporary permission //add the temporary permission
$p = new permissions; $p = permissions::new();
$p->add("email_template_add", 'temp'); $p->add("email_template_add", 'temp');
$p->add("email_template_edit", 'temp'); $p->add("email_template_edit", 'temp');

View File

@ -135,7 +135,7 @@
//execute //execute
if (isset($array) && is_array($array)) { if (isset($array) && is_array($array)) {
//assign temp permission //assign temp permission
$p = new permissions; $p = permissions::new();
$p->add('fax_add', 'temp'); $p->add('fax_add', 'temp');
$p->add('fax_edit', 'temp'); $p->add('fax_edit', 'temp');

View File

@ -107,7 +107,7 @@
$array['fax'][0]['fax_description'] = $fax_description; $array['fax'][0]['fax_description'] = $fax_description;
//execute insert //execute insert
$p = new permissions; $p = permissions::new();
$p->add('fax_add', 'temp'); $p->add('fax_add', 'temp');
$database = new database; $database = new database;

View File

@ -174,7 +174,7 @@
$array['fax_users'][0]['fax_uuid'] = $fax_uuid; $array['fax_users'][0]['fax_uuid'] = $fax_uuid;
$array['fax_users'][0]['user_uuid'] = $user_uuid; $array['fax_users'][0]['user_uuid'] = $user_uuid;
$p = new permissions; $p = permissions::new();
$p->add('fax_user_delete', 'temp'); $p->add('fax_user_delete', 'temp');
$database = new database; $database = new database;
@ -202,7 +202,7 @@
$array['fax_users'][0]['fax_uuid'] = $fax_uuid; $array['fax_users'][0]['fax_uuid'] = $fax_uuid;
$array['fax_users'][0]['user_uuid'] = $user_uuid; $array['fax_users'][0]['user_uuid'] = $user_uuid;
$p = new permissions; $p = permissions::new();
$p->add('fax_user_add', 'temp'); $p->add('fax_user_add', 'temp');
$database = new database; $database = new database;
@ -299,7 +299,7 @@
$array['fax'][0]['dialplan_uuid'] = $dialplan_uuid; $array['fax'][0]['dialplan_uuid'] = $dialplan_uuid;
//assign temp permission //assign temp permission
$p = new permissions; $p = permissions::new();
$p->add('fax_add', 'temp'); $p->add('fax_add', 'temp');
//set the dialplan action //set the dialplan action
@ -311,7 +311,7 @@
$array['fax'][0]['fax_uuid'] = $fax_uuid; $array['fax'][0]['fax_uuid'] = $fax_uuid;
//assign temp permission //assign temp permission
$p = new permissions; $p = permissions::new();
$p->add('fax_edit', 'temp'); $p->add('fax_edit', 'temp');
} }

View File

@ -810,7 +810,7 @@ if (!function_exists('fax_split_dtmf')) {
$array['fax_queue'][0]['fax_command'] = 'originate '.$dial_string; $array['fax_queue'][0]['fax_command'] = 'originate '.$dial_string;
//add temporary permisison //add temporary permisison
$p = new permissions; $p = permissions::new();
$p->add('fax_queue_add', 'temp'); $p->add('fax_queue_add', 'temp');
//save the data //save the data

View File

@ -99,7 +99,7 @@ if (!class_exists('fax')) {
$array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid; $array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
//execute delete //execute delete
@ -166,7 +166,7 @@ if (!class_exists('fax')) {
$array['dialplans'][] = $dialplan; $array['dialplans'][] = $dialplan;
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", 'temp'); $p->add("dialplan_add", 'temp');
$p->add("dialplan_detail_add", 'temp'); $p->add("dialplan_detail_add", 'temp');
$p->add("dialplan_edit", 'temp'); $p->add("dialplan_edit", 'temp');
@ -312,7 +312,7 @@ if (!class_exists('fax')) {
if (!empty($array) && is_array($array) && @sizeof($array) != 0) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('fax_delete', 'temp'); $p->add('fax_delete', 'temp');
$p->add('fax_user_delete', 'temp'); $p->add('fax_user_delete', 'temp');
$p->add('fax_file_delete', 'temp'); $p->add('fax_file_delete', 'temp');
@ -625,7 +625,7 @@ if (!class_exists('fax')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('fax_add', 'temp'); $p->add('fax_add', 'temp');
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');

View File

@ -388,7 +388,7 @@
$array['fax_queue'][0]['fax_response'] = $fax_response; $array['fax_queue'][0]['fax_response'] = $fax_response;
//add temporary permissions //add temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('fax_queue_edit', 'temp'); $p->add('fax_queue_edit', 'temp');
//save the data //save the data
@ -603,7 +603,7 @@
$array['fax_queue'][0]['fax_notify_date'] = 'now()'; $array['fax_queue'][0]['fax_notify_date'] = 'now()';
//add temporary permissions //add temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('fax_queue_edit', 'temp'); $p->add('fax_queue_edit', 'temp');
//save the data //save the data

View File

@ -242,7 +242,7 @@
} }
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -111,7 +111,7 @@ if (!class_exists('fifo')) {
//delete the checked rows //delete the checked rows
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('fifo_member_delete', 'temp'); $p->add('fifo_member_delete', 'temp');
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
@ -261,7 +261,7 @@ if (!class_exists('fifo')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('fifo_member_add', 'temp'); $p->add('fifo_member_add', 'temp');
//save the array //save the array

View File

@ -54,7 +54,7 @@ if ($domains_processed == 1) {
} }
if (!empty($array)) { if (!empty($array)) {
$p = new permissions; $p = permissions::new();
$p->add('ivr_menu_edit', 'temp'); $p->add('ivr_menu_edit', 'temp');
$database->app_name = 'ivr_menus'; $database->app_name = 'ivr_menus';

View File

@ -151,7 +151,7 @@
$array['dialplans'] = $dialplan; $array['dialplans'] = $dialplan;
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -393,7 +393,7 @@
$array['dialplans'][0]["app_uuid"] = "a5788e9b-58bc-bd1b-df59-fff5d51253ab"; $array['dialplans'][0]["app_uuid"] = "a5788e9b-58bc-bd1b-df59-fff5d51253ab";
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
if ($action == "add") { if ($action == "add") {
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
} }

View File

@ -139,7 +139,7 @@ if (!class_exists('ivr_menu')) {
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('ivr_menu_option_delete', 'temp'); $p->add('ivr_menu_option_delete', 'temp');
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
@ -312,7 +312,7 @@ if (!class_exists('ivr_menu')) {
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -459,7 +459,7 @@ if (!class_exists('ivr_menu')) {
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('ivr_menu_option_add', 'temp'); $p->add('ivr_menu_option_add', 'temp');
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
@ -471,7 +471,7 @@ if (!class_exists('ivr_menu')) {
unset($array); unset($array);
//revoke temporary permissions //revoke temporary permissions
$p = new permissions; $p = permissions::new();
$p->delete('ivr_menu_option_add', 'temp'); $p->delete('ivr_menu_option_add', 'temp');
$p->delete('dialplan_add', 'temp'); $p->delete('dialplan_add', 'temp');

View File

@ -743,7 +743,7 @@ if (!class_exists('modules')) {
} }
if (!empty($array) && is_array($array) && @sizeof($array) != 0) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('module_add', 'temp'); $p->add('module_add', 'temp');
//execute insert //execute insert
$database = new database; $database = new database;

View File

@ -93,7 +93,7 @@ if ($domains_processed == 1) {
$array['music_on_hold'][0]['music_on_hold_chime_max'] = isset($chime_max) ? $chime_max : null; $array['music_on_hold'][0]['music_on_hold_chime_max'] = isset($chime_max) ? $chime_max : null;
$array['music_on_hold'][0]['music_on_hold_path'] = $stream_path; $array['music_on_hold'][0]['music_on_hold_path'] = $stream_path;
$p = new permissions; $p = permissions::new();
$p->add('music_on_hold_add', 'temp'); $p->add('music_on_hold_add', 'temp');
$database->app_name = 'app_name'; $database->app_name = 'app_name';

View File

@ -272,7 +272,7 @@
$array['music_on_hold'][0]['music_on_hold_chime_freq'] = null; $array['music_on_hold'][0]['music_on_hold_chime_freq'] = null;
$array['music_on_hold'][0]['music_on_hold_chime_max'] = null; $array['music_on_hold'][0]['music_on_hold_chime_max'] = null;
$p = new permissions; $p = permissions::new();
$p->add('music_on_hold_add', 'temp'); $p->add('music_on_hold_add', 'temp');
$database = new database; $database = new database;

View File

@ -301,7 +301,7 @@ if (!class_exists('switch_music_on_hold')) {
//view_array($array, false); //view_array($array, false);
//save the data //save the data
$p = new permissions; $p = permissions::new();
$p->add('music_on_hold_add', 'temp'); $p->add('music_on_hold_add', 'temp');
$database = new database; $database = new database;

View File

@ -119,7 +119,7 @@ if (!class_exists('number_translations')) {
} }
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('number_translation_add', 'temp'); $p->add('number_translation_add', 'temp');
$p->add('number_translation_detail_add', 'temp'); $p->add('number_translation_detail_add', 'temp');
//execute insert //execute insert
@ -176,7 +176,7 @@ if (!class_exists('number_translations')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('number_translation_detail_delete', 'temp'); $p->add('number_translation_detail_delete', 'temp');
//execute delete //execute delete
@ -390,7 +390,7 @@ if (!class_exists('number_translations')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('number_translation_detail_add', 'temp'); $p->add('number_translation_detail_add', 'temp');
//save the array //save the array

View File

@ -83,7 +83,7 @@ if ($domains_processed == 1) {
$array['phrase_details'][$index]['phrase_detail_data'] = $phrase_detail_data; $array['phrase_details'][$index]['phrase_detail_data'] = $phrase_detail_data;
} }
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
$p = new permissions; $p = permissions::new();
$p->add('phrase_detail_edit', 'temp'); $p->add('phrase_detail_edit', 'temp');
$database->app_name = 'phrases'; $database->app_name = 'phrases';
@ -119,7 +119,7 @@ if ($domains_processed == 1) {
$array['phrase_details'][$index]['phrase_detail_data'] = $phrase_detail_data; $array['phrase_details'][$index]['phrase_detail_data'] = $phrase_detail_data;
} }
if (!empty($array)) { if (!empty($array)) {
$p = new permissions; $p = permissions::new();
$p->add('phrase_detail_edit', 'temp'); $p->add('phrase_detail_edit', 'temp');
$database->app_name = 'phrases'; $database->app_name = 'phrases';

View File

@ -160,7 +160,7 @@
} }
//execute insert //execute insert
$p = new permissions; $p = permissions::new();
$p->add('phrase_detail_add', 'temp'); $p->add('phrase_detail_add', 'temp');
$database = new database; $database = new database;
@ -224,7 +224,7 @@
} }
//execute update/insert //execute update/insert
$p = new permissions; $p = permissions::new();
$p->add('phrase_detail_add', 'temp'); $p->add('phrase_detail_add', 'temp');
$database = new database; $database = new database;

View File

@ -122,7 +122,7 @@ if (!class_exists('phrases')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('phrase_detail_delete', 'temp'); $p->add('phrase_detail_delete', 'temp');
//execute delete //execute delete
@ -204,7 +204,7 @@ if (!class_exists('phrases')) {
if (!empty($array) && is_array($array) && @sizeof($array) != 0) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('phrase_detail_delete', 'temp'); $p->add('phrase_detail_delete', 'temp');
//execute delete //execute delete
@ -398,7 +398,7 @@ if (!class_exists('phrases')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('phrase_detail_add', 'temp'); $p->add('phrase_detail_add', 'temp');
//save the array //save the array

View File

@ -43,7 +43,7 @@ if ($domains_processed == 1) {
$array['devices'][0]['device_uuid'] = $device_uuid; $array['devices'][0]['device_uuid'] = $device_uuid;
$array['devices'][0]['device_address'] = $device_address; $array['devices'][0]['device_address'] = $device_address;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('device_add', 'temp'); $p->add('device_add', 'temp');
//execute update //execute update
$database->app_name = 'provision'; $database->app_name = 'provision';
@ -67,7 +67,7 @@ if ($domains_processed == 1) {
$array['default_settings'][$x]['default_setting_enabled'] = 'true'; $array['default_settings'][$x]['default_setting_enabled'] = 'true';
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('default_setting_edit', 'temp'); $p->add('default_setting_edit', 'temp');
//execute update //execute update

View File

@ -548,7 +548,7 @@
$array['devices'][$x]['device_description'] = $_SERVER['HTTP_USER_AGENT']; $array['devices'][$x]['device_description'] = $_SERVER['HTTP_USER_AGENT'];
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("device_add", "temp"); $p->add("device_add", "temp");
$p->add("device_edit", "temp"); $p->add("device_edit", "temp");

View File

@ -60,7 +60,7 @@
$array['recordings'][0]['domain_uuid'] = $recording_domain_uuid; $array['recordings'][0]['domain_uuid'] = $recording_domain_uuid;
$array['recordings'][0]['recording_base64'] = $recording_base64; $array['recordings'][0]['recording_base64'] = $recording_base64;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('recording_edit', 'temp'); $p->add('recording_edit', 'temp');
//update recording record with base64 //update recording record with base64
$database->app_name = 'recordings'; $database->app_name = 'recordings';
@ -109,7 +109,7 @@
$array['recordings'][0]['recording_base64'] = null; $array['recordings'][0]['recording_base64'] = null;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('recording_edit', 'temp'); $p->add('recording_edit', 'temp');
//update recording record //update recording record

View File

@ -179,7 +179,7 @@
$array['recordings'][0]['domain_uuid'] = $domain_uuid; $array['recordings'][0]['domain_uuid'] = $domain_uuid;
$array['recordings'][0]['recording_base64'] = null; $array['recordings'][0]['recording_base64'] = null;
//set temporary permissions //set temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('recording_edit', 'temp'); $p->add('recording_edit', 'temp');
//execute update //execute update
$database = new database; $database = new database;
@ -217,7 +217,7 @@
$array['recordings'][0]['recording_base64'] = $recording_base64; $array['recordings'][0]['recording_base64'] = $recording_base64;
} }
//set temporary permissions //set temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('recording_add', 'temp'); $p->add('recording_add', 'temp');
//execute insert //execute insert
$database = new database; $database = new database;
@ -239,7 +239,7 @@
$array['recordings'][0]['recording_uuid'] = $found_recording_uuid; $array['recordings'][0]['recording_uuid'] = $found_recording_uuid;
$array['recordings'][0]['recording_base64'] = $recording_base64; $array['recordings'][0]['recording_base64'] = $recording_base64;
//set temporary permissions //set temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('recording_edit', 'temp'); $p->add('recording_edit', 'temp');
//execute update //execute update
$database = new database; $database = new database;

View File

@ -49,7 +49,7 @@ if ($domains_processed == 1) {
} }
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('ring_group_edit', 'temp'); $p->add('ring_group_edit', 'temp');
//execute update //execute update
$database->app_name = 'ring_groups'; $database->app_name = 'ring_groups';

View File

@ -125,7 +125,7 @@ if (!class_exists('ring_groups')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('ring_group_user_delete', 'temp'); $p->add('ring_group_user_delete', 'temp');
$p->add('ring_group_destination_delete', 'temp'); $p->add('ring_group_destination_delete', 'temp');
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
@ -305,7 +305,7 @@ if (!class_exists('ring_groups')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -472,7 +472,7 @@ if (!class_exists('ring_groups')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('ring_group_user_add', 'temp'); $p->add('ring_group_user_add', 'temp');
$p->add('ring_group_destination_add', 'temp'); $p->add('ring_group_destination_add', 'temp');
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");

View File

@ -83,7 +83,7 @@
if (is_array($array) && sizeof($array) != 0) { if (is_array($array) && sizeof($array) != 0) {
//update ring group //update ring group
$p = new permissions; $p = permissions::new();
$p->add('ring_group_edit', 'temp'); $p->add('ring_group_edit', 'temp');
$database->app_name = 'ring_groups'; $database->app_name = 'ring_groups';

View File

@ -110,7 +110,7 @@
$array['ring_group_users'][0]['user_uuid'] = $user_uuid; $array['ring_group_users'][0]['user_uuid'] = $user_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('ring_group_user_delete', 'temp'); $p->add('ring_group_user_delete', 'temp');
//execute delete //execute delete
@ -248,7 +248,7 @@
$array['ring_group_users'][0]['user_uuid'] = $user_uuid; $array['ring_group_users'][0]['user_uuid'] = $user_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('ring_group_user_add', 'temp'); $p->add('ring_group_user_add', 'temp');
//execute delete //execute delete
@ -486,7 +486,7 @@
$array["dialplans"][0]["app_uuid"] = "1d61fb65-1eec-bc73-a6ee-a6203b4fe6f2"; $array["dialplans"][0]["app_uuid"] = "1d61fb65-1eec-bc73-a6ee-a6203b4fe6f2";
//add the dialplan permission //add the dialplan permission
$p = new permissions; $p = permissions::new();
$p->add("dialplan_add", "temp"); $p->add("dialplan_add", "temp");
$p->add("dialplan_edit", "temp"); $p->add("dialplan_edit", "temp");

View File

@ -120,7 +120,7 @@
//execute inserts //execute inserts
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('sip_profile_add', 'temp'); $p->add('sip_profile_add', 'temp');
$p->add('sip_profile_domain_add', 'temp'); $p->add('sip_profile_domain_add', 'temp');
$p->add('sip_profile_setting_add', 'temp'); $p->add('sip_profile_setting_add', 'temp');
@ -198,7 +198,7 @@
//execute inserts //execute inserts
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('sip_profile_domain_add', 'temp'); $p->add('sip_profile_domain_add', 'temp');
//execute insert //execute insert

View File

@ -116,7 +116,7 @@ if (!class_exists('sip_profiles')) {
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('sip_profile_domain_delete', 'temp'); $p->add('sip_profile_domain_delete', 'temp');
$p->add('sip_profile_setting_delete', 'temp'); $p->add('sip_profile_setting_delete', 'temp');

View File

@ -206,7 +206,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('sip_profile_domain_add', 'temp'); $p->add('sip_profile_domain_add', 'temp');
$p->add('sip_profile_setting_add', 'temp'); $p->add('sip_profile_setting_add', 'temp');

View File

@ -69,7 +69,7 @@ if ($domains_processed == 1) {
//add settings that are not in the database //add settings that are not in the database
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('sofia_global_setting_add', 'temp'); $p->add('sofia_global_setting_add', 'temp');
//execute insert //execute insert

View File

@ -100,7 +100,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_delete', 'temp'); $p->add('dialplan_delete', 'temp');
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
@ -193,7 +193,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
//save the array //save the array
@ -310,7 +310,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
$p->add('dialplan_detail_add', 'temp'); $p->add('dialplan_detail_add', 'temp');

View File

@ -153,7 +153,7 @@
$array['dialplans'][0]['dialplan_context'] = $dialplan_context; $array['dialplans'][0]['dialplan_context'] = $dialplan_context;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_add', 'temp'); $p->add('dialplan_add', 'temp');
} }
else if ($action == "update") { else if ($action == "update") {
@ -161,7 +161,7 @@
$array['dialplan_details'][0]['dialplan_uuid'] = $dialplan_uuid; $array['dialplan_details'][0]['dialplan_uuid'] = $dialplan_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_detail_delete', 'temp'); $p->add('dialplan_detail_delete', 'temp');
//execute delete //execute delete
@ -182,7 +182,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_edit', 'temp'); $p->add('dialplan_edit', 'temp');
} }
@ -481,7 +481,7 @@
//execute query //execute query
if (!empty($array) && is_array($array) && @sizeof($array) != 0) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('dialplan_detail_add', 'temp'); $p->add('dialplan_detail_add', 'temp');
$p->add('dialplan_detail_edit', 'temp'); $p->add('dialplan_detail_edit', 'temp');

View File

@ -95,7 +95,7 @@ if ($domains_processed == 1) {
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add("var_add", "temp"); $p->add("var_add", "temp");
$p->add("var_edit", "temp"); $p->add("var_edit", "temp");
@ -194,7 +194,7 @@ if ($domains_processed == 1) {
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add("var_add", "temp"); $p->add("var_add", "temp");
//execute inserts //execute inserts

View File

@ -52,7 +52,7 @@ if ($domains_processed == 1) {
} }
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_greeting_edit', 'temp'); $p->add('voicemail_greeting_edit', 'temp');
//execute //execute
@ -104,7 +104,7 @@ if ($domains_processed == 1) {
} }
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_greeting_edit', 'temp'); $p->add('voicemail_greeting_edit', 'temp');
//execute update //execute update
@ -151,7 +151,7 @@ if ($domains_processed == 1) {
} }
if (!empty($array)) { if (!empty($array)) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_greeting_edit', 'temp'); $p->add('voicemail_greeting_edit', 'temp');
//execute update //execute update

View File

@ -223,7 +223,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_greeting_add', 'temp'); $p->add('voicemail_greeting_add', 'temp');
$p->add('voicemail_greeting_edit', 'temp'); $p->add('voicemail_greeting_edit', 'temp');

View File

@ -421,7 +421,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_delete', 'temp'); $p->add('voicemail_delete', 'temp');
$p->add('voicemail_option_delete', 'temp'); $p->add('voicemail_option_delete', 'temp');
$p->add('voicemail_message_delete', 'temp'); $p->add('voicemail_message_delete', 'temp');
@ -537,7 +537,7 @@
//delete the checked rows //delete the checked rows
if (!empty($array) && is_array($array) && @sizeof($array) != 0) { if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_destination_delete', 'temp'); $p->add('voicemail_destination_delete', 'temp');
//execute delete //execute delete
@ -708,7 +708,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_message_delete', 'temp'); $p->add('voicemail_message_delete', 'temp');
//execute delete //execute delete
@ -746,7 +746,7 @@
$array['voicemail_messages'][0]['message_status'] = $new_status; $array['voicemail_messages'][0]['message_status'] = $new_status;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_message_edit', 'temp'); $p->add('voicemail_message_edit', 'temp');
//execute update //execute update
@ -989,7 +989,7 @@
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('email_queue_add', 'temp'); $p->add('email_queue_add', 'temp');
$p->add('email_queue_attachment_add', 'temp'); $p->add('email_queue_attachment_add', 'temp');
@ -1094,7 +1094,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_message_edit', 'temp'); $p->add('voicemail_message_edit', 'temp');
//execute update //execute update
@ -1134,7 +1134,7 @@
$array['voicemail_messages'][0]['message_status'] = 'saved'; $array['voicemail_messages'][0]['message_status'] = 'saved';
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('voicemail_message_edit', 'temp'); $p->add('voicemail_message_edit', 'temp');
//execute update //execute update

View File

@ -199,7 +199,7 @@
$array['voicemails'][0]['voicemail_description'] = $voicemail_description; $array['voicemails'][0]['voicemail_description'] = $voicemail_description;
//create permissions object //create permissions object
$p = new permissions; $p = permissions::new();
//add voicemail options //add voicemail options
if (permission_exists('voicemail_option_add') && sizeof($voicemail_options) > 0) { if (permission_exists('voicemail_option_add') && sizeof($voicemail_options) > 0) {

View File

@ -231,7 +231,7 @@ if (!class_exists('xml_cdr')) {
} }
//add the temporary permission //add the temporary permission
$p = new permissions; $p = permissions::new();
$p->add("xml_cdr_add", "temp"); $p->add("xml_cdr_add", "temp");
$p->add("xml_cdr_json_add", "temp"); $p->add("xml_cdr_json_add", "temp");
$p->add("xml_cdr_flow_add", "temp"); $p->add("xml_cdr_flow_add", "temp");
@ -2124,7 +2124,7 @@ if (!class_exists('xml_cdr')) {
} }
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('call_recording_delete', 'temp'); $p->add('call_recording_delete', 'temp');
//execute delete //execute delete

View File

@ -114,7 +114,7 @@
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//add temporary permissions //add temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('xml_cdr_edit', 'temp'); $p->add('xml_cdr_edit', 'temp');
//remove record_path, record_name and record_length //remove record_path, record_name and record_length

View File

@ -94,7 +94,7 @@
//add the missing email templates //add the missing email templates
if (!empty($array['email_templates'])) { if (!empty($array['email_templates'])) {
//add the temporary permission //add the temporary permission
$p = new permissions; $p = permissions::new();
$p->add("email_template_add", 'temp'); $p->add("email_template_add", 'temp');
$p->add("email_template_edit", 'temp'); $p->add("email_template_edit", 'temp');

View File

@ -272,7 +272,7 @@ class plugin_database {
$array['user_groups'][0]['user_uuid'] = $this->user_uuid; $array['user_groups'][0]['user_uuid'] = $this->user_uuid;
//grant temporary permissions //grant temporary permissions
$p = new permissions; $p = permissions::new();
$p->add('user_edit', 'temp'); $p->add('user_edit', 'temp');
//execute insert //execute insert

Some files were not shown because too many files have changed in this diff Show More