Added permission check in Building::delete()

This commit is contained in:
Frank Schubert
2021-07-20 22:52:06 +02:00
parent 3b1dd928a6
commit 7f6ed3e1eb

View File

@@ -146,6 +146,11 @@ class BuildingController extends mfBaseController {
}
protected function deleteAction() {
if(!$this->me->is("Admin") && !$this->me->is("pipeplanner")) {
$this->layout()->setFlash("Keine Berechtigung", "error");
$this->redirect("Building");
}
$id = $this->request->id;
if(!is_numeric($id) || !$id) {