This commit is contained in:
markjcrane
2015-08-02 23:43:53 +00:00
6 changed files with 35 additions and 75 deletions

View File

@@ -83,6 +83,9 @@
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_user_context";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
//schema details
$y = 0; //table array index

View File

@@ -85,7 +85,7 @@ else {
if (if_group("superadmin")) {
$accountcode = $_POST["accountcode"];
}
else if (if_group("admin") && $billing_app_exists) {
elseif (if_group("admin") && $billing_app_exists) {
$sql_accountcode = "SELECT COUNT(*) as count FROM v_billings WHERE domain_uuid = '".$_SESSION['domain_uuid']."' AND type_value='".$_POST["accountcode"]."'";
$prep_statement_accountcode = $db->prepare(check_sql($sql_accountcode));
$prep_statement_accountcode->execute();
@@ -328,7 +328,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
}
//set the default user context
if (if_group("superadmin")) {
if (permission_exists("extension_user_context")) {
//allow a user assigned to super admin to change the user_context
}
else {
@@ -634,7 +634,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "directory_exten_visible = '$directory_exten_visible', ";
$sql .= "limit_max = '$limit_max', ";
$sql .= "limit_destination = '$limit_destination', ";
$sql .= "user_context = '$user_context', ";
if (permission_exists("extension_user_context")) {
$sql .= "user_context = '$user_context', ";
}
if (permission_exists('extension_missed_call')) {
$sql .= "missed_call_app = '$missed_call_app', ";
$sql .= "missed_call_data = '$missed_call_data', ";
@@ -881,7 +883,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "update") {
$document['title'] = $text['title-extension-edit'];
}
else if ($action == "add") {
elseif ($action == "add") {
$document['title'] = $text['title-extension-add'];
}