Disabled deleting Preorders for non-admins
This commit is contained in:
@@ -1075,6 +1075,8 @@ $pagination_entity_name = "Vorbestellungen";
|
||||
<?php if(!$me->is(["preorderfront"]) && !$me->is("preorderreadonly")): ?>
|
||||
<a href="#" data-home-id="<?=$preorder->adb_wohneinheit_id?>" data-home-contact title="Kontakte bearbeiten"><i class="fas fa-users-cog text-primary"></i></a>
|
||||
<a href="<?=self::getUrl("Preorder", "edit", ["id" => $preorder->id])?>"><i class="far fa-edit" title="Vorbestellung Bearbeiten"></i></a>
|
||||
<?php endif; ?>
|
||||
<?php if($me->isAdmin()): ?>
|
||||
<a href="<?=self::getUrl("Preorder", "delete", ["id" => $preorder->id, "filter" => $filter])?>" class="text-danger" onclick="if(!confirm('Vorbestellung wirklich löschen?')) return false;" title="Vorbestellung Löschen"><i class="fas fa-trash"></i></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -791,6 +791,10 @@ class PreorderController extends mfBaseController {
|
||||
$qs = http_build_query($qs);
|
||||
}
|
||||
|
||||
if(!$this->me->isAdmin()) {
|
||||
$this->redirect("Preorder", "Index", $qs);
|
||||
}
|
||||
|
||||
$id = $this->request->id;
|
||||
if(!is_numeric($id) || $id < 1) {
|
||||
$this->layout()->setFlash("Vorbestellung nicht gefunden!", "error");
|
||||
|
||||
Reference in New Issue
Block a user