From 3715e81419c62df8bc1da0f60bbdfc862318add3 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Thu, 6 Feb 2025 14:12:37 +0100 Subject: [PATCH] Everyone can create Workorders for Preorders now --- Layout/default/Preorder/Index.php | 4 +--- application/Preorder/PreorderController.php | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Layout/default/Preorder/Index.php b/Layout/default/Preorder/Index.php index 511fb5f54..01ce07859 100644 --- a/Layout/default/Preorder/Index.php +++ b/Layout/default/Preorder/Index.php @@ -423,9 +423,7 @@ $pagination_entity_name = "Vorbestellungen"; Partner Attribute Erstellt
Bearbeitet - is(["Admin","netowner"])): ?> - - + diff --git a/application/Preorder/PreorderController.php b/application/Preorder/PreorderController.php index f354215ec..f5147c7f8 100644 --- a/application/Preorder/PreorderController.php +++ b/application/Preorder/PreorderController.php @@ -1345,12 +1345,14 @@ class PreorderController extends mfBaseController { /*if($preorder->type != "legacytransfer") { return false; }*/ - if(!$this->me->is("Admin")) { + if(!$this->me->is("Admin") && !$this->me->can("preorder")) { + $this->log->debug(__METHOD__.": no permission"); return false; } $workorder = $preorder->createRimoWorkorder(); if(!$workorder) { + $this->log->debug(__METHOD__.": error creating workorder"); return false; }