summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven G. Brönstrup2021-12-20 12:00:41 +0100
committerSven G. Brönstrup2021-12-20 12:00:41 +0100
commit61901841d04b824668cd0f382ee039573ebb9479 (patch)
tree18713971c40db3c65b4dcd2f3628403e0645d65c
parent76073dd28c46f59c247f09846f43bd92c016f8af (diff)
parent5c843aec6f9aafb37cf5d166e6ae74974e773daf (diff)
Merge branch 'main' into extended-scripts
-rw-r--r--.gitlab-ci.yml3
-rw-r--r--lib/Properties.hs5
2 files changed, 7 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 79b5e36..a74364b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,9 @@ stages:
- build
build-job:
+ only:
+ refs:
+ - main
stage: build
script:
- stack build
diff --git a/lib/Properties.hs b/lib/Properties.hs
index 75b69ae..970424a 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -227,6 +227,9 @@ checkLayer = do
checkObjectProperty :: Object -> Property -> LintWriter Layer
checkObjectProperty obj p@(Property name _) = case name of
+ "url" -> unwrapURI (Proxy @"website") p
+ (dependsOn . Link)
+ (const $ forbid "using \"url\" to open local html files is disallowed.")
"url" -> do
pure ()
unwrapURI (Proxy @"website") p
@@ -408,7 +411,7 @@ checkTileLayerProperty p@(Property name _value) = case name of
suggestProperty $ Property "openWebsiteTrigger" (StrProp "onaction")
unwrapURI (Proxy @"website") p
(dependsOn . Link)
- (dependsOn . Local)
+ (const $ forbid "using openWebsite to access local html files is disallowed.")
"openWebsiteTrigger" -> do
isString p
requireProperty "openWebsite"