diff --git a/app/adminer/app_config.php b/app/adminer/app_config.php index 87635b5231..32cb4915de 100644 --- a/app/adminer/app_config.php +++ b/app/adminer/app_config.php @@ -37,6 +37,8 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'adminer'; + //$apps[$x]['permissions'][0]['menu']['parent_uuid'] = '594d99c5-6128-9c88-ca35-4b33392cec0f'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '1f59d07b-b4f7-4f9e-bde9-312cf491d66e'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; ?> diff --git a/app/call_block/app_config.php b/app/call_block/app_config.php index fccf875fbc..ff92e51162 100644 --- a/app/call_block/app_config.php +++ b/app/call_block/app_config.php @@ -40,6 +40,7 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'call_block_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = '29295c90-b1b9-440b-9c7E-c8363c6e8975'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $apps[$x]['permissions'][$y]['groups'][] = 'user'; diff --git a/app/call_broadcast/app_config.php b/app/call_broadcast/app_config.php index a815224e9d..cd3867a8c2 100644 --- a/app/call_broadcast/app_config.php +++ b/app/call_broadcast/app_config.php @@ -38,6 +38,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'call_broadcast_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '50153bbf-78c5-b49e-7bd9-4b3e4b1134e6'; $apps[$x]['permissions'][0]['groups'][] = 'admin'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; diff --git a/app/call_center/app_config.php b/app/call_center/app_config.php index ceee2b89a6..0129a1967a 100644 --- a/app/call_center/app_config.php +++ b/app/call_center/app_config.php @@ -57,6 +57,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'call_center_queues_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '6c072b29-5b6c-49fc-008e-95e24c77de99'; $apps[$x]['permissions'][0]['groups'][] = 'agent'; $apps[$x]['permissions'][0]['groups'][] = 'admin'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; @@ -74,7 +75,8 @@ $apps[$x]['permissions'][3]['groups'][] = 'superadmin'; $apps[$x]['permissions'][4]['name'] = 'call_center_agents_view'; - $apps[$x]['permissions'][0]['groups'][] = 'agent'; + $apps[$x]['permissions'][4]['menu']['uuid'] = '597c483a-51a9-f95a-8d54-ea7d87ada2b8'; + $apps[$x]['permissions'][4]['groups'][] = 'agent'; $apps[$x]['permissions'][4]['groups'][] = 'admin'; $apps[$x]['permissions'][4]['groups'][] = 'superadmin'; @@ -91,7 +93,8 @@ $apps[$x]['permissions'][7]['groups'][] = 'superadmin'; $apps[$x]['permissions'][8]['name'] = 'call_center_tiers_view'; - $apps[$x]['permissions'][0]['groups'][] = 'agent'; + $apps[$x]['permissions'][8]['menu']['uuid'] = ''; + $apps[$x]['permissions'][8]['groups'][] = 'agent'; $apps[$x]['permissions'][8]['groups'][] = 'admin'; $apps[$x]['permissions'][8]['groups'][] = 'superadmin'; diff --git a/app/call_center_active/app_config.php b/app/call_center_active/app_config.php index efa1b4de6e..956604a57a 100644 --- a/app/call_center_active/app_config.php +++ b/app/call_center_active/app_config.php @@ -38,6 +38,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'call_center_active_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '7fb0dd87-e984-9980-c512-2c76b887aeb2'; $apps[$x]['permissions'][0]['groups'][] = 'admin'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; diff --git a/app/call_flows/app_config.php b/app/call_flows/app_config.php index 6c900dbfd2..b5e9c33309 100644 --- a/app/call_flows/app_config.php +++ b/app/call_flows/app_config.php @@ -39,6 +39,7 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'call_flow_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = 'b0939384-7055-44e8-8b4c-9f72293e1878'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $y++; diff --git a/app/calls_active/app_config.php b/app/calls_active/app_config.php index 1e8eee6819..9e40c59d80 100644 --- a/app/calls_active/app_config.php +++ b/app/calls_active/app_config.php @@ -55,6 +55,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'calls_active_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = 'eba3d07f-dd5c-6b7b-6880-493b44113ade'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; $apps[$x]['permissions'][1]['name'] = 'calls_active_transfer'; @@ -70,6 +71,7 @@ $apps[$x]['permissions'][4]['groups'][] = 'superadmin'; $apps[$x]['permissions'][5]['name'] = 'extensions_active_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '6dd85c19-cb6b-5cca-bf32-499bbe936f79'; //$apps[$x]['permissions'][5]['groups'][] = 'user'; $apps[$x]['permissions'][5]['groups'][] = 'admin'; $apps[$x]['permissions'][5]['groups'][] = 'superadmin'; @@ -91,11 +93,13 @@ $apps[$x]['permissions'][9]['groups'][] = 'superadmin'; $apps[$x]['permissions'][10]['name'] = 'extensions_active_list_view'; + $apps[$x]['permissions'][10]['menu']['uuid'] = ''; //$apps[$x]['permissions'][10]['groups'][] = 'user'; $apps[$x]['permissions'][10]['groups'][] = 'admin'; $apps[$x]['permissions'][10]['groups'][] = 'superadmin'; $apps[$x]['permissions'][11]['name'] = 'extensions_active_assigned_view'; + $apps[$x]['permissions'][11]['menu']['uuid'] = ''; //$apps[$x]['permissions'][11]['groups'][] = 'user'; $apps[$x]['permissions'][11]['groups'][] = 'admin'; $apps[$x]['permissions'][11]['groups'][] = 'superadmin'; diff --git a/app/click_to_call/app_config.php b/app/click_to_call/app_config.php index e1950e4eb4..5c4b13fce1 100644 --- a/app/click_to_call/app_config.php +++ b/app/click_to_call/app_config.php @@ -36,6 +36,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'click_to_call_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = 'f862556f-9ddd-2697-fdf4-bed08ec63aa5'; $apps[$x]['permissions'][0]['groups'][] = 'user'; $apps[$x]['permissions'][0]['groups'][] = 'admin'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; diff --git a/app/conference_centers/app_config.php b/app/conference_centers/app_config.php index 62f2a28a4c..79ef9d4287 100644 --- a/app/conference_centers/app_config.php +++ b/app/conference_centers/app_config.php @@ -40,6 +40,7 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'conference_center_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = '95f88726-4706-43f0-b52b-9504a0b8046f'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $y++; @@ -56,6 +57,7 @@ $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $y++; $apps[$x]['permissions'][$y]['name'] = 'conference_room_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = ''; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $apps[$x]['permissions'][$y]['groups'][] = 'user'; @@ -76,6 +78,7 @@ $apps[$x]['permissions'][$y]['groups'][] = 'user'; $y++; $apps[$x]['permissions'][$y]['name'] = 'conference_session_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = ''; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $apps[$x]['permissions'][$y]['groups'][] = 'user'; @@ -409,4 +412,4 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; */ -?> \ No newline at end of file +?> diff --git a/app/conferences/app_config.php b/app/conferences/app_config.php index b5f36627de..76fd7383c7 100644 --- a/app/conferences/app_config.php +++ b/app/conferences/app_config.php @@ -40,6 +40,7 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'conference_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = '9f2a8c08-3e65-c41c-a716-3b53d42bc4d4'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'user'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; @@ -154,4 +155,4 @@ $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'user_uuid'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; -?> \ No newline at end of file +?> diff --git a/app/conferences_active/app_config.php b/app/conferences_active/app_config.php index 1b35ad2113..7bc4315291 100644 --- a/app/conferences_active/app_config.php +++ b/app/conferences_active/app_config.php @@ -39,6 +39,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'conferences_active_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '2d857bbb-43b9-b8f7-a138-642868e0453a'; $apps[$x]['permissions'][0]['groups'][] = 'user'; $apps[$x]['permissions'][0]['groups'][] = 'admin'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; diff --git a/app/contacts/app_config.php b/app/contacts/app_config.php index 8fe9723c59..e934fdfb51 100644 --- a/app/contacts/app_config.php +++ b/app/contacts/app_config.php @@ -39,6 +39,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'contacts_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = 'f14e6ab6-6565-d4e6-cbad-a51d2e3e8ec6'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; //$apps[$x]['permissions'][0]['groups'][] = 'user'; $apps[$x]['permissions'][0]['groups'][] = 'admin'; diff --git a/app/content/app_config.php b/app/content/app_config.php index fc6e95add2..f0d1293dfc 100644 --- a/app/content/app_config.php +++ b/app/content/app_config.php @@ -38,6 +38,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'content_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '90397352-395c-40f6-2087-887144abc06d'; $apps[$x]['permissions'][0]['groups'][] = 'admin'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; diff --git a/app/destinations/app_config.php b/app/destinations/app_config.php index 7db355596a..eb314e002b 100644 --- a/app/destinations/app_config.php +++ b/app/destinations/app_config.php @@ -39,6 +39,7 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'destination_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = 'fd2a708a-ff03-c707-c19d-5a4194375eba'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; //$apps[$x]['permissions'][$y]['groups'][] = 'admin'; $y++; diff --git a/app/devices/app_config.php b/app/devices/app_config.php index c2222a0ef9..8d8b1ca64e 100644 --- a/app/devices/app_config.php +++ b/app/devices/app_config.php @@ -39,6 +39,7 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'device_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = 'f9dce498-b7f9-740f-e592-9e8ff3dac2a0'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; diff --git a/app/dialplan/app_config.php b/app/dialplan/app_config.php index 5ad4f50448..e8a99bbec2 100644 --- a/app/dialplan/app_config.php +++ b/app/dialplan/app_config.php @@ -56,6 +56,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'dialplan_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = 'b94e8bd9-9eb5-e427-9c26-ff7a6c21552a'; $apps[$x]['permissions'][0]['groups'][] = 'admin'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; @@ -69,6 +70,7 @@ $apps[$x]['permissions'][3]['groups'][] = 'superadmin'; $apps[$x]['permissions'][4]['name'] = 'dialplan_advanced_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '52929fee-81d3-4d94-50b7-64842d9393c2'; $apps[$x]['permissions'][4]['groups'][] = 'superadmin'; $apps[$x]['permissions'][5]['name'] = 'dialplan_advanced_edit'; diff --git a/app/dialplan_inbound/app_config.php b/app/dialplan_inbound/app_config.php index c983280c2c..e7660ddf68 100644 --- a/app/dialplan_inbound/app_config.php +++ b/app/dialplan_inbound/app_config.php @@ -38,6 +38,7 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'inbound_route_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = 'b64b2bbf-f99b-b568-13dc-32170515a687'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $y++; diff --git a/app/dialplan_outbound/app_config.php b/app/dialplan_outbound/app_config.php index 7eb02bac63..e2f4c802ea 100644 --- a/app/dialplan_outbound/app_config.php +++ b/app/dialplan_outbound/app_config.php @@ -37,6 +37,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'outbound_route_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '17e14094-1d57-1106-db2a-a787d34015e9'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; $apps[$x]['permissions'][1]['name'] = 'outbound_route_add'; diff --git a/app/edit/app_config.php b/app/edit/app_config.php index 57b728aca9..d6eea525a7 100644 --- a/app/edit/app_config.php +++ b/app/edit/app_config.php @@ -85,14 +85,14 @@ $apps[$x]['menu'][$y]['groups'][] = 'superadmin'; $y++; $apps[$x]['menu'][$y]['title']['en-us'] = 'Grammar Editor'; - $apps[$x]['menu'][$y]['title']['es-mx'] = 'Editor Gramático'; + $apps[$x]['menu'][$y]['title']['es-mx'] = 'Editor Gramático'; $apps[$x]['menu'][$y]['title']['de'] = ''; $apps[$x]['menu'][$y]['title']['de-ch'] = ''; $apps[$x]['menu'][$y]['title']['de-at'] = ''; - $apps[$x]['menu'][$y]['title']['fr'] = "L'éditeur grammairien"; + $apps[$x]['menu'][$y]['title']['fr'] = "L'éditeur grammairien"; $apps[$x]['menu'][$y]['title']['fr-ca'] = ''; $apps[$x]['menu'][$y]['title']['fr-ch'] = ''; - $apps[$x]['menu'][$y]['title']['pt-pt'] = 'Editor Gramático'; + $apps[$x]['menu'][$y]['title']['pt-pt'] = 'Editor Gramático'; $apps[$x]['menu'][$y]['title']['pt-br'] = ''; $apps[$x]['menu'][$y]['uuid'] = 'c3db739e-89f9-0fa2-44ce-0f4c2ff43b1a'; $apps[$x]['menu'][$y]['parent_uuid'] = '594d99c5-6128-9c88-ca35-4b33392cec0f'; @@ -103,30 +103,35 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'script_editor_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = 'f1905fec-0577-daef-6045-59d09b7d3f94'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; $apps[$x]['permissions'][$y]['name'] = 'script_editor_save'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; $apps[$x]['permissions'][$y]['name'] = 'provision_editor_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = '57773542-a565-1a29-605d-6535da1a0870'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; $apps[$x]['permissions'][$y]['name'] = 'provision_editor_save'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; $apps[$x]['permissions'][$y]['name'] = 'xml_editor_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = '16013877-606a-2a05-7d6a-c1b215839131'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; $apps[$x]['permissions'][$y]['name'] = 'xml_editor_save'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; $apps[$x]['permissions'][$y]['name'] = 'php_editor_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = 'eae1f2d6-789b-807c-cc26-44501e848693'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; $apps[$x]['permissions'][$y]['name'] = 'php_editor_save'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; $apps[$x]['permissions'][$y]['name'] = 'grammar_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = 'c3db739e-89f9-0fa2-44ce-0f4c2ff43b1a'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; @@ -169,4 +174,4 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; -?> \ No newline at end of file +?> diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php index 0ee428530f..674fcaa2f4 100644 --- a/app/voicemails/app_config.php +++ b/app/voicemails/app_config.php @@ -24,6 +24,7 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'voicemail_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = '0347f82a-62a0-49d0-bacd-511d080c46d5'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $y++; diff --git a/app/xml_cdr/app_config.php b/app/xml_cdr/app_config.php index 00b9a448b4..68d3b9f2c6 100644 --- a/app/xml_cdr/app_config.php +++ b/app/xml_cdr/app_config.php @@ -59,6 +59,8 @@ //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'xml_cdr_view'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5'; + $apps[$x]['permissions'][$y]['menu']['uuid'] = '8f80e71a-31a5-6432-47a0-7f5a7b271f05'; $apps[$x]['permissions'][$y]['groups'][] = 'user'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; diff --git a/app/xmpp/app_config.php b/app/xmpp/app_config.php index 29b2e49d7f..fc06bd2865 100644 --- a/app/xmpp/app_config.php +++ b/app/xmpp/app_config.php @@ -38,6 +38,7 @@ //permission details $apps[$x]['permissions'][0]['name'] = 'xmpp_view'; + $apps[$x]['permissions'][0]['menu']['uuid'] = '1808365b-0f7c-7555-89d0-31b3d9a75abb'; $apps[$x]['permissions'][0]['groups'][] = 'superadmin'; $apps[$x]['permissions'][1]['name'] = 'xmpp_add'; diff --git a/core/menu/app_config.php b/core/menu/app_config.php index 27c0c7d8f9..00fb34974d 100644 --- a/core/menu/app_config.php +++ b/core/menu/app_config.php @@ -284,6 +284,7 @@ $apps[$x]['db'][$y]['fields'][$z]['name'] = 'group_name'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $y = 3; //table array index $z = 0; //field array index diff --git a/core/users/app_config.php b/core/users/app_config.php index d905e9e0d8..ee79bd4240 100644 --- a/core/users/app_config.php +++ b/core/users/app_config.php @@ -225,6 +225,12 @@ $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'groupdesc'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'group_unchanged'; + $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'groupdesc'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $y = 2; //table array index $z = 0; //field array index diff --git a/core/users/app_languages.php b/core/users/app_languages.php index 1819fcc402..6907c03269 100644 --- a/core/users/app_languages.php +++ b/core/users/app_languages.php @@ -40,6 +40,7 @@ $text['label-time_zone']['en-us'] = 'Time Zone'; $text['label-enabled']['en-us'] = 'Enabled'; $text['label-group_name']['en-us'] = 'Name'; + $text['label-group_check']['en-us'] = 'Protected'; $text['label-group_description']['en-us'] = 'Description'; $text['label-group_permissions']['en-us'] = 'Permissions'; $text['label-group_members']['en-us'] = 'Members'; @@ -68,7 +69,13 @@ $text['button-back']['en-us'] = 'Back'; $text['button-save']['en-us'] = 'Save'; $text['button-restore']['en-us'] = 'Restore Default'; + $text['button-copy']['en-us'] = 'Copy'; $text['button-add_member']['en-us'] = 'Add Member'; + + $text['message-copy']['en-us'] = 'Copy Completed'; + $text['message-copy']['pt-pt'] = ''; + $text['message-message']['en-us'] = 'Message'; + $text['message-message']['pt-pt'] = ''; $text['confirm-delete']['en-us'] = 'Do you really want to delete this?'; diff --git a/core/users/group_permissions.php b/core/users/group_permissions.php index b388be5b8b..c9a9dedf6d 100644 --- a/core/users/group_permissions.php +++ b/core/users/group_permissions.php @@ -26,6 +26,13 @@ require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; +require_once "resources/classes/logging.php"; +// Logging class initialization +$log = new Logging(); + +// set path and name of log file (optional) +$log->lfile('/tmp/mylog.txt'); + if (permission_exists('group_permissions') || if_group("superadmin")) { //access granted } @@ -106,6 +113,7 @@ require_once "resources/paging.php"; $permission_name = $row["permission_name"]; $permissions_db[$permission_name] = "true"; } + //show the db checklist //echo "
";
//print_r($permissions_db);
@@ -121,7 +129,8 @@ require_once "resources/paging.php";
$permissions_db_checklist[$row['name']] = "false";
}
}
- }
+ }
+
//show the db checklist
//echo "";
//print_r($permissions_db_checklist);
@@ -167,6 +176,58 @@ require_once "resources/paging.php";
$sql .= "and permission_name = '$permission' ";
$db->exec(check_sql($sql));
unset($sql);
+
+ foreach($apps as $app) {
+ foreach ($app['permissions'] as $row) {
+ if ($row['name'] == $permission) {
+
+ $log->lwrite("2");
+ $log->lwrite($row['menu']['uuid']);
+
+ $sql = "delete from v_menu_item_groups ";
+ $sql .= "where menu_item_uuid = '".$row['menu']['uuid']."' ";
+ $sql .= "and group_name = '$group_name' ";
+ $sql .= "and menu_uuid = 'b4750c3f-2a86-b00d-b7d0-345c14eca286' ";
+ $db->exec(check_sql($sql));
+ unset($sql);
+
+ $sql = "";
+ $sql .= " select menu_item_parent_uuid from v_menu_items ";
+ $sql .= "where menu_item_uuid = '".$row['menu']['uuid']."' ";
+ $sql .= "and menu_uuid = 'b4750c3f-2a86-b00d-b7d0-345c14eca286' ";
+ $prep_statement = $db->prepare(check_sql($sql));
+ $prep_statement->execute();
+ $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+ foreach ($result as &$row) {
+ $menu_item_parent_uuid = $row["menu_item_parent_uuid"];
+ }
+ unset ($prep_statement);
+
+ $sql = "";
+ $sql .= " select * from v_menu_items as i, v_menu_item_groups as g ";
+ $sql .= "where i.menu_item_uuid = g.menu_item_uuid ";
+ $sql .= "and i.menu_uuid = 'b4750c3f-2a86-b00d-b7d0-345c14eca286' ";
+ $sql .= "and i.menu_item_parent_uuid = '$menu_item_parent_uuid' ";
+ $sql .= "and g.group_name = '$group_name' ";
+ $prep_statement = $db->prepare(check_sql($sql));
+ $prep_statement->execute();
+ $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+ $result_count = count($result);
+ if ($result_count == 0) {
+ $sql = "delete from v_menu_item_groups ";
+ $sql .= "where menu_item_uuid = '$menu_item_parent_uuid' ";
+ $sql .= "and group_name = '$group_name' ";
+ $sql .= "and menu_uuid = 'b4750c3f-2a86-b00d-b7d0-345c14eca286' ";
+ $db->exec(check_sql($sql));
+ unset($sql);
+ }
+ unset ($prep_statement);
+
+
+
+ }
+ }
+ }
//set the permission to false in the permissions_db_checklist
$permissions_db_checklist[$permission] = "false";
}
@@ -188,6 +249,71 @@ require_once "resources/paging.php";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
+
+ foreach($apps as $app) {
+ foreach ($app['permissions'] as $row) {
+ if ($row['name'] == $permission) {
+
+ $log->lwrite("1");
+ $log->lwrite($row['menu']['uuid']);
+ $log->lwrite($row['menu']['parent_uuid']);
+
+ $sql = "insert into v_menu_item_groups ";
+ $sql .= "(";
+ $sql .= "menu_uuid, ";
+ $sql .= "menu_item_uuid, ";
+ $sql .= "group_name ";
+ $sql .= ")";
+ $sql .= "values ";
+ $sql .= "(";
+ $sql .= "'b4750c3f-2a86-b00d-b7d0-345c14eca286', ";
+ $sql .= "'".$row['menu']['uuid']."', ";
+ $sql .= "'$group_name' ";
+ $sql .= ")";
+ $db->exec(check_sql($sql));
+ unset($sql);
+
+ $sql = "";
+ $sql .= " select menu_item_parent_uuid from v_menu_items ";
+ $sql .= "where menu_item_uuid = '".$row['menu']['uuid']."' ";
+ $sql .= "and menu_uuid = 'b4750c3f-2a86-b00d-b7d0-345c14eca286' ";
+ $prep_statement = $db->prepare(check_sql($sql));
+ $prep_statement->execute();
+ $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+ foreach ($result as &$row) {
+ $menu_item_parent_uuid = $row["menu_item_parent_uuid"];
+ }
+ unset ($prep_statement);
+
+ $sql = "";
+ $sql .= " select * from v_menu_item_groups ";
+ $sql .= "where menu_item_uuid = '$menu_item_parent_uuid' ";
+ $sql .= "and group_name = '$group_name' ";
+ $sql .= "and menu_uuid = 'b4750c3f-2a86-b00d-b7d0-345c14eca286' ";
+ $prep_statement = $db->prepare(check_sql($sql));
+ $prep_statement->execute();
+ $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+ $result_count = count($result);
+ if ($result_count == 0) {
+ $sql = "insert into v_menu_item_groups ";
+ $sql .= "(";
+ $sql .= "menu_uuid, ";
+ $sql .= "menu_item_uuid, ";
+ $sql .= "group_name ";
+ $sql .= ")";
+ $sql .= "values ";
+ $sql .= "(";
+ $sql .= "'b4750c3f-2a86-b00d-b7d0-345c14eca286', ";
+ $sql .= "'$menu_item_parent_uuid', ";
+ $sql .= "'$group_name' ";
+ $sql .= ")";
+ $db->exec(check_sql($sql));
+ unset($sql);
+ }
+ unset ($prep_statement);
+ }
+ }
+ }
//set the permission to true in the permissions_db_checklist
$permissions_db_checklist[$permission] = "true";
}
@@ -233,8 +359,19 @@ require_once "resources/paging.php";
$app_name = $app['name'];
$description = $app['description']['en-us'];
+ echo "| \n";
echo "".$app_name." \n"; + echo " | \n";
+ echo "
| \n";
echo "".$description." "; + echo " | \n";
+ echo "
| ".$text['label-permission_permissions']." | \n"; diff --git a/core/users/groups.php b/core/users/groups.php index 4b188e1c1a..1011bd7408 100644 --- a/core/users/groups.php +++ b/core/users/groups.php @@ -45,6 +45,21 @@ else { //show the header require_once "resources/header.php"; $page["title"] = $text['title-group_manager']; + + if (isset($_REQUEST["change"])) { + //get the values from the HTTP POST and save them as PHP variables + $change = check_str($_REQUEST["change"]); + $group_name = check_str($_REQUEST["group_name"]); + + $sql = "update v_groups set "; + $sql .= "group_unchanged = '$change' "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and group_name = '$group_name' "; + $db->exec(check_sql($sql)); + unset($sql); + } + + //show the content echo "||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ".$text['label-group_name']." | \n"; + $strlist .= "".$text['label-group_check']." | \n"; $strlist .= "".$text['label-group_description']." | \n"; $strlist .= "\n"; @@ -86,6 +102,7 @@ else { $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { $group_name = $row["group_name"]; + $group_unchanged= $row["group_unchanged"]; $group_uuid = $row["group_uuid"]; $group_description = $row["group_description"]; if (strlen($group_name) == 0) { $group_name = " "; } @@ -98,6 +115,15 @@ else { else { $strlist .= " | |||||
|---|---|---|---|---|---|---|---|---|
| $group_name | \n"; + //$strlist .= "$group_unchanged | \n"; + $strlist .= "\n"; + if ($group_unchanged == "true") { + $strlist .= " \n"; + } + else { + $strlist .= " \n"; + } + $strlist .= " | \n"; $strlist .= "$group_description | \n"; $strlist .= "\n"; @@ -120,7 +146,7 @@ else { } $strlist .= " | ||||
| \n"; + $strlist .= " | \n"; if (permission_exists('group_add')) { $strlist .= " $v_link_label_add\n"; } | |||||||