Merge branch 'fronkdev' into 'master'

Everyone can create Workorders for Preorders now

See merge request fronk/thetool!1001
This commit is contained in:
Frank Schubert
2025-02-06 13:44:29 +00:00
2 changed files with 4 additions and 4 deletions

View File

@@ -423,9 +423,7 @@ $pagination_entity_name = "Vorbestellungen";
<th>Partner</th>
<th>Attribute</th>
<th>Erstellt<br />Bearbeitet</th>
<?php if($me->is(["Admin","netowner"])): ?>
<th></th>
<?php endif; ?>
<th></th>
<th></th>
</tr>
<?php foreach($preorders as $preorder): ?>

View File

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