Fixed an issue that allowed some disabled module content to be visible or accessible.
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
|
||||
use api\classes\API_companies;
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['customers']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
|
||||
session_start();
|
||||
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_companies.php';
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
use api\classes\API_office_stompjes;
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['office']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
|
||||
session_start();
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_office_stompjes.php';
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
use api\classes\API_servers;
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['servers']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
|
||||
session_start();
|
||||
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_servers.php';
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
if (!defined('APP_INIT')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['customers']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($_GET['view'])) {
|
||||
include_once($_SERVER['DOCUMENT_ROOT'] . '/bin/pages/customers/pageCompanies_company_view.php');
|
||||
} else {
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
if (!defined('APP_INIT')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['customers']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
# IDE Section
|
||||
|
||||
# Includes Section
|
||||
|
||||
@@ -3,6 +3,10 @@ if (!defined('APP_INIT')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['customers']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
# IDE Section
|
||||
|
||||
# Includes Section
|
||||
@@ -26,8 +30,8 @@ $jsScriptLoadData['datatables'] = true;
|
||||
$jsScriptLoadData['multiFilterSelect'] = true;
|
||||
$jsScriptLoadData['datepicker'] = true;
|
||||
$jsScriptLoadData['activateCompany'] = true;
|
||||
# PageClasses Setup
|
||||
|
||||
# PageClasses Setup
|
||||
|
||||
# Retrieve Information for the page
|
||||
if (!isset($_GET['all'])) {
|
||||
@@ -66,9 +70,8 @@ while ($row = $stmt->fetch_assoc()) {
|
||||
<i class="fa-solid fa-filter"></i> <?php echo __('show_active') ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
<form method="post" action="/api/v1/customers/companies/sync/">
|
||||
<form method="post" action="/api/v1/sources/inserve/sync-companies/">
|
||||
<input type="hidden">
|
||||
<div class="col-lg-auto col-md-auto col-sm-auto">
|
||||
<button class="btn btn-primary">
|
||||
@@ -89,7 +92,9 @@ while ($row = $stmt->fetch_assoc()) {
|
||||
<th><?php echo __('company_id') ?></th>
|
||||
<th><?php echo __('company_debtor') ?></th>
|
||||
<th><?php echo __('company_state') ?></th>
|
||||
<?php if ($GLOBALS['modules_enabled']['servers']) { ?>
|
||||
<th><?php echo __('server_count') ?></th>
|
||||
<?php } ?>
|
||||
<th><?php echo __('actions') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -99,7 +104,9 @@ while ($row = $stmt->fetch_assoc()) {
|
||||
<th><?php echo __('company_id') ?></th>
|
||||
<th><?php echo __('company_debtor') ?></th>
|
||||
<th><?php echo __('company_state') ?></th>
|
||||
<?php if ($GLOBALS['modules_enabled']['servers']) { ?>
|
||||
<th><?php echo __('server_count') ?></th>
|
||||
<?php } ?>
|
||||
<th><?php echo __('actions') ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@@ -111,7 +118,9 @@ while ($row = $stmt->fetch_assoc()) {
|
||||
<td class="text-nowrap"><?php echo $company['company_source_id'] ?></td>
|
||||
<td class="text-nowrap"><?php echo $company['company_source_id2'] ?></td>
|
||||
<td class="text-nowrap"><?php echo $company['company_state'] ?></td>
|
||||
<?php if ($GLOBALS['modules_enabled']['servers']) { ?>
|
||||
<td class="text-nowrap"><?php echo $company['server_count'] ?></td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<a href="/companies?view=<?php echo $company['company_uuid'] ?>" class="btn btn-info btn-sm btn-rounded" data-item-uuid="<?php echo $company['company_uuid'] ?>"><i class="fa-solid fa-eye"></i></a>
|
||||
<?php if ($API->checkPermissions('customer-companies', 'RW', true) && $company['server_count'] == 0) { ?>
|
||||
|
||||
@@ -5,6 +5,12 @@ use api\classes\API;
|
||||
if (!defined('APP_INIT')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['office']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
|
||||
# IDE Section
|
||||
|
||||
# Includes Section
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
if (!defined('APP_INIT')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['servers']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($_GET['view'])) {
|
||||
include_once($_SERVER['DOCUMENT_ROOT'] . '/bin/pages/servers/pageServerOverview_server_view.php');
|
||||
} else {
|
||||
|
||||
@@ -6,6 +6,11 @@ use bin\php\Classes\pageNavbar;
|
||||
if (!defined('APP_INIT')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['servers']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
# IDE Section
|
||||
|
||||
# Includes Section
|
||||
@@ -37,11 +42,13 @@ $stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
$server_data = $result->fetch_assoc();
|
||||
|
||||
if ($GLOBALS['modules_enabled']['customers']) {
|
||||
$companies_data = $GLOBALS['conn']->query("SELECT company_uuid, company_name FROM companies WHERE company_state = 'active'");
|
||||
$companies = array();
|
||||
while ($company_data = $companies_data->fetch_assoc()) {
|
||||
array_push($companies, $company_data);
|
||||
}
|
||||
}
|
||||
|
||||
# Retrieve Information for the page
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM vc_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
@@ -194,6 +201,7 @@ $pageNavbar->outPutNavbar();
|
||||
</h4>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($GLOBALS['modules_enabled']['customers']) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
@@ -223,7 +231,7 @@ $pageNavbar->outPutNavbar();
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
|
||||
@@ -5,6 +5,11 @@ use api\classes\API;
|
||||
if (!defined('APP_INIT')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$GLOBALS['modules_enabled']['servers']) {
|
||||
echo '405 Not Allowed';
|
||||
exit;
|
||||
}
|
||||
# IDE Section
|
||||
|
||||
# Includes Section
|
||||
|
||||
Reference in New Issue
Block a user