diff --git a/app/conference_centers/app_config.php b/app/conference_centers/app_config.php index c0e6b5cd08..260dc4dc23 100644 --- a/app/conference_centers/app_config.php +++ b/app/conference_centers/app_config.php @@ -34,15 +34,16 @@ $apps[$x]['menu'][$y]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5'; $apps[$x]['menu'][$y]['category'] = 'internal'; $apps[$x]['menu'][$y]['path'] = '/app/conference_centers/conference_centers.php'; - $apps[$x]['menu'][$y]['groups'][] = 'admin'; $apps[$x]['menu'][$y]['groups'][] = 'superadmin'; + $apps[$x]['menu'][$y]['groups'][] = 'admin'; + $apps[$x]['menu'][$y]['groups'][] = 'user'; //permission details $y = 0; $apps[$x]['permissions'][$y]['name'] = 'conference_center_view'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; - $apps[$x]['permissions'][$y]['groups'][] = 'user'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; + $apps[$x]['permissions'][$y]['groups'][] = 'user'; $y++; $apps[$x]['permissions'][$y]['name'] = 'conference_center_add'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; @@ -51,7 +52,6 @@ $apps[$x]['permissions'][$y]['name'] = 'conference_center_edit'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; - $apps[$x]['permissions'][$y]['groups'][] = 'user'; $y++; $apps[$x]['permissions'][$y]['name'] = 'conference_center_delete'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; @@ -60,6 +60,7 @@ $apps[$x]['permissions'][$y]['name'] = 'conference_room_view'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; + $apps[$x]['permissions'][$y]['groups'][] = 'user'; $y++; $apps[$x]['permissions'][$y]['name'] = 'conference_room_add'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; @@ -68,6 +69,7 @@ $apps[$x]['permissions'][$y]['name'] = 'conference_room_edit'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; + $apps[$x]['permissions'][$y]['groups'][] = 'user'; $y++; $apps[$x]['permissions'][$y]['name'] = 'conference_room_delete'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; @@ -76,6 +78,7 @@ $apps[$x]['permissions'][$y]['name'] = 'conference_session_view'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'admin'; + $apps[$x]['permissions'][$y]['groups'][] = 'user'; $y++; //schema details diff --git a/app/conference_centers/conference_rooms.php b/app/conference_centers/conference_rooms.php index 9d20bf7e8e..7db3b33dde 100644 --- a/app/conference_centers/conference_rooms.php +++ b/app/conference_centers/conference_rooms.php @@ -40,7 +40,7 @@ require_once "includes/paging.php"; $switch_cmd = "conference xml_list"; $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); if (!$fp) { - + //connection to even socket failed } else { $xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd)); @@ -88,8 +88,13 @@ require_once "includes/paging.php"; echo "\n"; //prepare to page the results - $sql = "select count(*) as num_rows from v_conference_rooms "; - $sql .= "where domain_uuid = '$domain_uuid' "; + $sql = "select count(*) as num_rows from v_conference_rooms as r, v_meeting_users as u "; + $sql .= "where r.domain_uuid = '$domain_uuid' "; + $sql .= "and r.meeting_uuid = u.meeting_uuid "; + if (!if_group("admin") && !if_group("superadmin")) { + $sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' "; + } + //$sql .= "and r.meeting_uuid = 'fbd2214a-39db-4a93-bd84-3fd830f63dba' "; if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } $prep_statement = $db->prepare($sql); if ($prep_statement) { @@ -112,8 +117,12 @@ require_once "includes/paging.php"; $offset = $rows_per_page * $page; //get the list - $sql = "select * from v_conference_rooms "; - $sql .= "where domain_uuid = '$domain_uuid' "; + $sql = "select * from v_conference_rooms as r, v_meeting_users as u "; + $sql .= "where r.domain_uuid = '$domain_uuid' "; + $sql .= "and r.meeting_uuid = u.meeting_uuid "; + if (!if_group("admin") && !if_group("superadmin")) { + $sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' "; + } if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } $sql .= "limit $rows_per_page offset $offset "; $prep_statement = $db->prepare(check_sql($sql));