Refactoring: introduce 'isPrivileged'

This commit is contained in:
Pieter Vander Vennet 2025-02-07 01:37:36 +01:00
parent 6ca055cf28
commit f405116bb1
11 changed files with 29 additions and 28 deletions

View file

@ -136,7 +136,7 @@ export class PrevalidateLayer extends DesugaringStep<LayerConfigJson> {
}
if (json.source === "special") {
if (!Constants.priviliged_layers.find((x) => x == json.id)) {
if (!Constants.isPriviliged(json)) {
context.err(
"Layer " +
json.id +
@ -150,7 +150,7 @@ export class PrevalidateLayer extends DesugaringStep<LayerConfigJson> {
json.allowMove === undefined &&
json.source["geoJson"] === undefined
) {
if (!Constants.priviliged_layers.find((x) => x == json.id)) {
if (!Constants.isPriviliged(json)) {
context.err("Layer " + json.id + " does not have an explicit 'allowMove'")
}
}