Fixed not finding unit sometimes in PreorderApi/submitPreorder

This commit is contained in:
Frank Schubert
2023-10-03 15:19:44 +02:00
parent a6aa87a5ee
commit acee68c6c3
4 changed files with 15 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ class AddressDBController extends mfBaseController {
$this->me = $me;
$this->layout()->set("me",$me);
if(!$me->is(["Admin", "netowner"])) {
if(!$me->is(["Admin", "netowner"]) && !$me->can("Preorder")) {
$this->redirect("Dashboard");
}
}
@@ -438,7 +438,7 @@ class AddressDBController extends mfBaseController {
}
protected function apiAction() {
if(!$this->me->is(["Admin","netowner"])) {
if(!$this->me->is(["Admin","netowner"]) && !$this->me->can("Preorder")) {
$this->redirect("Dashboard");
}
$do = $this->request->do;