mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update the registration permissions.
This commit is contained in:
@@ -37,11 +37,11 @@
|
||||
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
|
||||
|
||||
//permission details
|
||||
$apps[$x]['permissions'][0]['name'] = 'registrations_domain';
|
||||
$apps[$x]['permissions'][0]['name'] = 'registration_domain';
|
||||
$apps[$x]['permissions'][0]['groups'][] = 'admin';
|
||||
$apps[$x]['permissions'][0]['groups'][] = 'superadmin';
|
||||
|
||||
$apps[$x]['permissions'][1]['name'] = 'registrations_all';
|
||||
$apps[$x]['permissions'][1]['name'] = 'registration_all';
|
||||
$apps[$x]['permissions'][1]['groups'][] = 'superadmin';
|
||||
|
||||
?>
|
||||
@@ -29,7 +29,7 @@ require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists("registrations_domain") || permission_exists("registrations_all") || if_group("superadmin")) {
|
||||
if (permission_exists("registration_domain") || permission_exists("registration_all") || if_group("superadmin")) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
@@ -106,7 +106,7 @@ require_once "resources/check_auth.php";
|
||||
|
||||
//remove unrelated domains
|
||||
if (count($_SESSION["domains"]) > 1) {
|
||||
if (count($_SESSION["domains"]) > 1 && !permission_exists('registrations_all')) {
|
||||
if (count($_SESSION["domains"]) > 1 && !permission_exists('registration_all')) {
|
||||
if ($registrations[$x]['sip-auth-realm'] != $_SESSION['domain_name']) {
|
||||
unset($registrations[$x]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user