Fixed the ofice typo in the permission names to office
This commit is contained in:
@@ -36,7 +36,7 @@ if ($API_office_stompjes->request_method === 'GET') {
|
||||
} elseif ($API_office_stompjes->request_method === 'DELETE') {
|
||||
|
||||
# Only superuser can delete permission due to fact that the backend needs programming when setting a permission
|
||||
$API_office_stompjes->checkPermissions('ofice-stompjes', 'RW');
|
||||
$API_office_stompjes->checkPermissions('office-stompjes', 'RW');
|
||||
|
||||
# when called from the frontend will not be forwarding to a url since when its called from the frontend it doesnt need a redirection
|
||||
$API_office_stompjes->return_url = false;
|
||||
|
||||
@@ -19,7 +19,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API.php';
|
||||
|
||||
# Check permissions
|
||||
$API = new API();
|
||||
if (!$API->checkPermissions('ofice-stompjes', 'RO', true)) {
|
||||
if (!$API->checkPermissions('office-stompjes', 'RO', true)) {
|
||||
echo 'error 401 unauthorized';
|
||||
exit;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ while ($row = $stmt->fetch_assoc()) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-stats ms-3 ms-sm-0">
|
||||
<a href="#" class="btn btn-warning btn-lg btn-rounded stomp-btn w-100 <?php echo (!$API->checkPermissions('ofice-stompjes-canstomp', 'RW', true)) ? 'disabled' : '' ?>" data-item-uuid="<?php echo $administrator['user_uuid'] ?>" data-item-name="user_uuid" data-api-url="/api/v1/office/stompjes/"><i class="fa-solid fa-hand-fist"></i></a>
|
||||
<a href="#" class="btn btn-warning btn-lg btn-rounded stomp-btn w-100 <?php echo (!$API->checkPermissions('office-stompjes-canstomp', 'RW', true)) ? 'disabled' : '' ?>" data-item-uuid="<?php echo $administrator['user_uuid'] ?>" data-item-name="user_uuid" data-api-url="/api/v1/office/stompjes/"><i class="fa-solid fa-hand-fist"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,7 +154,7 @@ while ($row = $stmt->fetch_assoc()) {
|
||||
<th></th>
|
||||
<th><?php echo __('first_name') ?></th>
|
||||
<th><?php echo __('time') ?></th>
|
||||
<?php if ($API->checkPermissions('ofice-stompjes', 'RW', true)) { ?>
|
||||
<?php if ($API->checkPermissions('office-stompjes', 'RW', true)) { ?>
|
||||
<th><?php echo __('actions') ?></th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
@@ -164,7 +164,7 @@ while ($row = $stmt->fetch_assoc()) {
|
||||
<th></th>
|
||||
<th><?php echo __('first_name') ?></th>
|
||||
<th><?php echo __('time') ?></th>
|
||||
<?php if ($API->checkPermissions('ofice-stompjes', 'RW', true)) { ?>
|
||||
<?php if ($API->checkPermissions('office-stompjes', 'RW', true)) { ?>
|
||||
<th><?php echo __('actions') ?></th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
@@ -180,7 +180,7 @@ while ($row = $stmt->fetch_assoc()) {
|
||||
</td>
|
||||
<td class="text-nowrap"><?php echo $administrators[$stompje['user_uuid']]['user_first_name'] ?></td>
|
||||
<td class="text-nowrap"><?php echo date('d-m-y H:i:s', $stompje['stomp_timestamp']) ?></td>
|
||||
<?php if ($API->checkPermissions('ofice-stompjes', 'RW', true)) { ?>
|
||||
<?php if ($API->checkPermissions('office-stompjes', 'RW', true)) { ?>
|
||||
<td>
|
||||
<a href="#" class="btn btn-danger btn-sm btn-rounded stomp-delete-btn" data-item-uuid="<?php echo $stompje['stomp_uuid'] ?>" data-api-url="/api/v1/office/stompjes/" data-item-name="stomp_uuid"><i class="fas fa-trash-alt"></i></a>
|
||||
</td>
|
||||
|
||||
@@ -47,7 +47,7 @@ function showCard($module_name, $page_name, $width = 3)
|
||||
showCard('servers', 'server_overview', '6');
|
||||
}
|
||||
|
||||
if ($GLOBALS['modules_enabled']['office'] && $API->checkPermissions('ofice-stompjes', 'RO', true)) {
|
||||
if ($GLOBALS['modules_enabled']['office'] && $API->checkPermissions('office-stompjes', 'RO', true)) {
|
||||
showCard('office', 'stompjeslist');
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ class pageBuilder extends API
|
||||
<?php
|
||||
showPage('portal-management', 'dashboard');
|
||||
|
||||
if ($GLOBALS['modules_enabled']['office'] && $API->checkPermissions('ofice-stompjes', 'RO', true)) {
|
||||
if ($GLOBALS['modules_enabled']['office'] && $API->checkPermissions('office-stompjes', 'RO', true)) {
|
||||
showSpan('office');
|
||||
showPage('office', 'stompjeslist');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user