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') {
|
} elseif ($API_office_stompjes->request_method === 'DELETE') {
|
||||||
|
|
||||||
# Only superuser can delete permission due to fact that the backend needs programming when setting a permission
|
# 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
|
# 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;
|
$API_office_stompjes->return_url = false;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API.php';
|
|||||||
|
|
||||||
# Check permissions
|
# Check permissions
|
||||||
$API = new API();
|
$API = new API();
|
||||||
if (!$API->checkPermissions('ofice-stompjes', 'RO', true)) {
|
if (!$API->checkPermissions('office-stompjes', 'RO', true)) {
|
||||||
echo 'error 401 unauthorized';
|
echo 'error 401 unauthorized';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ while ($row = $stmt->fetch_assoc()) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-stats ms-3 ms-sm-0">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -154,7 +154,7 @@ while ($row = $stmt->fetch_assoc()) {
|
|||||||
<th></th>
|
<th></th>
|
||||||
<th><?php echo __('first_name') ?></th>
|
<th><?php echo __('first_name') ?></th>
|
||||||
<th><?php echo __('time') ?></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>
|
<th><?php echo __('actions') ?></th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -164,7 +164,7 @@ while ($row = $stmt->fetch_assoc()) {
|
|||||||
<th></th>
|
<th></th>
|
||||||
<th><?php echo __('first_name') ?></th>
|
<th><?php echo __('first_name') ?></th>
|
||||||
<th><?php echo __('time') ?></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>
|
<th><?php echo __('actions') ?></th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -180,7 +180,7 @@ while ($row = $stmt->fetch_assoc()) {
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap"><?php echo $administrators[$stompje['user_uuid']]['user_first_name'] ?></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>
|
<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>
|
<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>
|
<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>
|
</td>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ function showCard($module_name, $page_name, $width = 3)
|
|||||||
showCard('servers', 'server_overview', '6');
|
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');
|
showCard('office', 'stompjeslist');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ class pageBuilder extends API
|
|||||||
<?php
|
<?php
|
||||||
showPage('portal-management', 'dashboard');
|
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');
|
showSpan('office');
|
||||||
showPage('office', 'stompjeslist');
|
showPage('office', 'stompjeslist');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
ALTER TABLE `system_users` CHANGE COLUMN `user_pref_language` `user_pref_language` ENUM("en","nl") NOT NULL DEFAULT 'en' COLLATE 'utf8mb4_general_ci' AFTER `user_login_attempts`;
|
ALTER TABLE `system_users` CHANGE COLUMN `user_pref_language` `user_pref_language` ENUM("en","nl") NOT NULL DEFAULT 'en' COLLATE 'utf8mb4_general_ci' AFTER `user_login_attempts`;
|
||||||
|
UPDATE `sentri`.`system_permissions` SET `permission_name`='office-stompjes-canstomp' WHERE `permission_uuid`='5f284b11-de7c-11f0-9d57-00155d00153f';
|
||||||
|
UPDATE `sentri`.`system_permissions` SET `permission_name`='office-stompjes' WHERE `permission_uuid`='11abc93d-c265-11f0-95da-7e99ed98b725';
|
||||||
|
UPDATE `sentri`.`system_permissions` SET `permission_slugify`='office-stompjes' WHERE `permission_uuid`='11abc93d-c265-11f0-95da-7e99ed98b725';
|
||||||
|
UPDATE `sentri`.`system_permissions` SET `permission_slugify`='office-stompjes-canstomp' WHERE `permission_uuid`='5f284b11-de7c-11f0-9d57-00155d00153f';
|
||||||
Reference in New Issue
Block a user