Commit 2562744b authored by Johannes's avatar Johannes Committed by Johannes

Disallow admins leaving their region or workgroups

parent 39a0bf89
......@@ -114,7 +114,7 @@ final class RegionXhr extends Control
public function signout(): array
{
$data = $_GET;
if ($this->session->mayBezirk($data['bid'])) {
if ($this->session->mayBezirk($data['bid']) && !$this->session->isAdminFor($data['bid'])) {
$this->foodsaverGateway->deleteFromRegion($data['bid'], $this->session->id());
return array('status' => 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment