summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2021-09-16 01:18:11 +0200
committerstuebinm2021-09-16 01:18:11 +0200
commita27f5e365b83d88b230eb66b7032649bdb372546 (patch)
treef2c28af56297840d033de7ebac80e8d073c0c649
parent0787b24786a329dae5f25c1cd2916ce962471f1d (diff)
small update
-rw-r--r--src/Main.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Main.hs b/src/Main.hs
index c5787db..4de1183 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -123,12 +123,11 @@ checkProperty layer prop = do
urlValue <- lift $ getAttr prop "value"
info $ "found jitsi room: " <> showAeson urlValue
suggestPropertyValue "jitsiTrigger" "onaction"
- forbidProperty "jitsiUrl"
- -- TODO: not sure if we should really disallow these entirely
- forbidProperty "jitsiConfig"
- forbidProperty "jitsiClientConfig"
- forbidProperty "jitsiRoomAdminTag"
"jitsiTrigger" -> requireProperty "jitsiRoom"
+ "jitsiUrl" -> isForbidden
+ "jitsiConfig" -> isForbidden
+ "jitsiClientConfig" -> isForbidden
+ "jitsiRoomAdminTag" -> isForbidden
"playAudio" -> do
-- TODO: check for url validity?
lift $ propEqual prop "type" "string"
@@ -149,6 +148,8 @@ checkProperty layer prop = do
-- | forbid some property in this layer
forbidProperty name = when (hasProperty name layer)
$ forbid $ "property " <> quote name <> " should not be used"
+ -- | This property is forbidden and should not be used
+ isForbidden = forbid $ "property " <> quote ty <> " should not be used"
-- TODO: check if the property has the correct value
suggestPropertyValue name value = unless (hasProperty name layer)
$ suggest $ "set property " <> quote name <> " to " <> quote value