Checking permissions in status- & discount import
This commit is contained in:
@@ -775,6 +775,7 @@ class PreorderController extends mfBaseController {
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
$forbidden = 0;
|
||||
$notfound = 0;
|
||||
$invalidcode = 0;
|
||||
$nochange = 0;
|
||||
@@ -799,6 +800,11 @@ class PreorderController extends mfBaseController {
|
||||
continue;
|
||||
}
|
||||
|
||||
if($preorder->campaign->network->owner_id != $this->me->address_id) {
|
||||
$forbidden++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if($preorder->status->code != $new_status_code) {
|
||||
$new_status = PreorderstatusModel::getFirst(["code" => $new_status_code]);
|
||||
if(!$new_status_code) {
|
||||
@@ -818,6 +824,9 @@ class PreorderController extends mfBaseController {
|
||||
if($notfound) {
|
||||
$message .= "<br />$notfound Bestellungen nicht gefunden";
|
||||
}
|
||||
if($forbidden) {
|
||||
$message .= "<br />$forbidden Bestellungen in falschem Netzgebiet";
|
||||
}
|
||||
if($nochange) {
|
||||
$message .= "<br />$nochange Bestelllungen haben bereits den neuen Status";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user