All users can now be limited to certain preorder networks

This commit is contained in:
Frank Schubert
2023-09-18 10:01:53 +02:00
parent 06bf365f67
commit e465e30d5f
9 changed files with 161 additions and 64 deletions
@@ -46,10 +46,18 @@ final class AddCanPermissions extends AbstractMigration
if($perm["admin"] == "true") {
$this->query("UPDATE WorkerPermission SET $setAllTrue WHERE id=$id");
} elseif($perm["preorderfront"] == "false" && $perm['preorderaddressreporting'] == "false") {
$this->query("UPDATE WorkerPermission SET $setAllTrue WHERE id=$id");
} else {
} elseif($perm["preorderfront"] == "true" || $perm['preorderaddressreporting'] == "true") {
$this->query("UPDATE WorkerPermission SET `canPreorder` = 'true' WHERE id=$id");
} else {
$this->query("UPDATE WorkerPermission SET
`canBuilding` = 'true',
`canPipework` = 'true',
`canLinework` = 'true',
`canPatching` = 'true',
`canFilestore` = 'true',
`canOrder` = 'true',
`canPreorder` = 'true'
WHERE id=$id");
}
}