Make groups and group permissions global. Managing these per domain is too much work to manage per domain.

This commit is contained in:
Mark Crane
2014-12-26 06:37:07 +00:00
parent 630177eb55
commit 1b1738ed3f
9 changed files with 203 additions and 218 deletions

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
Portions created by the Initial Developer are Copyright (C) 2008-2014
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -25,22 +25,23 @@
*/
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('group_delete') || if_group("superadmin")) {
//access allowed
}
else {
echo "access denied";
return;
}
//check permissions
require_once "resources/check_auth.php";
if (permission_exists('group_delete') || if_group("superadmin")) {
//access allowed
}
else {
echo "access denied";
return;
}
//get the http value and set as a variable
$id = check_str($_GET["id"]);
//delete the group
$sqldelete = "delete from v_groups ";
$sqldelete .= "where domain_uuid = '$domain_uuid' ";
$sqldelete .= "and group_uuid = '$id' ";
$sqldelete .= "where group_uuid = '$id' ";
if (!$db->exec($sqldelete)) {
//echo $db->errorCode() . "<br>";
$info = $db->errorInfo();
@@ -53,4 +54,4 @@ else {
//redirect the user
header("Location: groups.php");
?>
?>