Fix for when a conference room has no admins
If a conference room had no admins it would become impossible to see it in the GUI This fix makes it possible for a admin or super admin to view rooms in this state. this uses a new permission "conference_room_view_all"
This commit is contained in:
parent
7bcb324e58
commit
5c1da9533e
|
|
@ -58,6 +58,10 @@
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||||
$y++;
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = "conference_room_view_all";
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "conference_room_add";
|
$apps[$x]['permissions'][$y]['name'] = "conference_room_add";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,18 @@
|
||||||
|
|
||||||
public function room_count() {
|
public function room_count() {
|
||||||
//get the room count
|
//get the room count
|
||||||
$sql = "select count(*) as num_rows from v_conference_rooms as r, v_meeting_users as u, v_meetings as p ";
|
$not_admin = 1;
|
||||||
|
if (if_permision("conference_room_view_all")) {
|
||||||
|
$not_admin = 0;
|
||||||
|
}
|
||||||
|
$sql = "select count(*) as num_rows from v_conference_rooms as r, v_meetings as p ";
|
||||||
|
if ($not_admin) {
|
||||||
|
$sql .= "v_meeting_users as u, ";
|
||||||
|
}
|
||||||
$sql .= "where r.domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "where r.domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$sql .= "and r.meeting_uuid = u.meeting_uuid ";
|
|
||||||
$sql .= "and r.meeting_uuid = p.meeting_uuid ";
|
$sql .= "and r.meeting_uuid = p.meeting_uuid ";
|
||||||
if (!if_group("admin") && !if_group("superadmin")) {
|
if ($not_admin) {
|
||||||
|
$sql .= "and r.meeting_uuid = u.meeting_uuid ";
|
||||||
$sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' ";
|
$sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' ";
|
||||||
}
|
}
|
||||||
if (isset($this->search)) {
|
if (isset($this->search)) {
|
||||||
|
|
@ -71,14 +78,24 @@
|
||||||
|
|
||||||
public function rooms() {
|
public function rooms() {
|
||||||
//get the list of rooms
|
//get the list of rooms
|
||||||
|
$not_admin = 1;
|
||||||
|
if (if_permision("conference_room_view_all")) {
|
||||||
|
$not_admin = 0;
|
||||||
|
}
|
||||||
$fields = "r.domain_uuid, r.conference_room_uuid, r.conference_center_uuid, r.meeting_uuid, r.conference_room_name, max_members, ";
|
$fields = "r.domain_uuid, r.conference_room_uuid, r.conference_center_uuid, r.meeting_uuid, r.conference_room_name, max_members, ";
|
||||||
$fields .= "wait_mod, announce, mute, sounds, created, created_by, r.enabled, r.description, record, ";
|
$fields .= "wait_mod, announce, mute, sounds, created, created_by, r.enabled, r.description, record, ";
|
||||||
$fields .= "profile, meeting_user_uuid, user_uuid, moderator_pin, participant_pin ";
|
$fields .= "profile, moderator_pin, participant_pin";
|
||||||
$sql = "select ".$fields." from v_conference_rooms as r, v_meeting_users as u, v_meetings as p ";
|
if ($not_admin) {
|
||||||
|
$fields .= ", meeting_user_uuid, user_uuid";
|
||||||
|
}
|
||||||
|
$sql = "select ".$fields." from v_conference_rooms as r, v_meetings as p ";
|
||||||
|
if ($not_admin) {
|
||||||
|
$sql .= ", v_meeting_users as u ";
|
||||||
|
}
|
||||||
$sql .= "where r.domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "where r.domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$sql .= "and r.meeting_uuid = u.meeting_uuid ";
|
|
||||||
$sql .= "and r.meeting_uuid = p.meeting_uuid ";
|
$sql .= "and r.meeting_uuid = p.meeting_uuid ";
|
||||||
if (!if_group("admin") && !if_group("superadmin")) {
|
if ($not_admin) {
|
||||||
|
$sql .= "and r.meeting_uuid = u.meeting_uuid ";
|
||||||
$sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' ";
|
$sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' ";
|
||||||
}
|
}
|
||||||
//if (is_numeric($this->search)) {
|
//if (is_numeric($this->search)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue