All users can now be limited to certain preorder networks
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user