Fixed the ofice typo in the permission names to office

This commit is contained in:
2026-06-13 23:25:27 +02:00
parent 98d5d1cb18
commit a7e3c54a89
5 changed files with 12 additions and 8 deletions

View File

@@ -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>