diff options
-rw-r--r-- | lib/Properties.hs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs index 1b6cab8..6d7e03c 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -236,7 +236,6 @@ checkObjectProperty p@(Property name _) = do (const $ forbid "using \"url\" to open local html files is disallowed.") unless (objectType obj == "website") $ complain "\"url\" can only be set for objects of type \"website\"" - "allowApi" -> forbidProperty name "getBadge" -> do when (1 /= length (getProperties obj)) $ warn "Objects with the property \"getBadge\" set are removed at runtime, \ @@ -291,6 +290,8 @@ checkObjectProperty p@(Property name _) = do suggestPropertyName' "door" suggestPropertyName "soundRadius" "set \"soundRadius\" to limit the door sound to a certain area." + | T.toLower name `elem` [ "allowapi" ] + -> forbidProperty name | otherwise -> warn $ "unknown object property " <> prettyprint name <> "." @@ -324,11 +325,6 @@ checkTileLayerProperty p@(Property name _value) = case name of "jitsiTriggerMessage" -> do isString p requireProperty "jitsiTrigger" - "jitsiUrl" -> isForbidden - "jitsiConfig" -> isForbidden - "jitsiClientConfig" -> isForbidden - "jitsiRoomAdminTag" -> isForbidden - "jitsiInterfaceConfig" -> isForbidden "jitsiWidth" -> isIntInRange 0 100 p "bbbRoom" -> do @@ -391,14 +387,11 @@ checkTileLayerProperty p@(Property name _value) = case name of "openWebsiteTriggerMessage" -> do isString p requireProperty "openWebsiteTrigger" - "openWebsitePolicy" -> isForbidden - "openWebsiteAllowApi" -> isForbidden "openTab" -> do isString p requireProperty "openWebsite" "url" -> complain "the property \"url\" defining embedded iframes must be \ \set on an object in an objectgroup layer." - "allowApi" -> isForbidden "exitUrl" -> do forbidEmptyLayer unwrapURI (Proxy @"map") p @@ -453,10 +446,14 @@ checkTileLayerProperty p@(Property name _value) = case name of -> do { isString p; requireProperty "bellVariable" } | name `elem` [ "enterValue", "leaveValue" ] -> do { isString p; requireProperty "bindVariable" } + | T.toLower name `elem` [ "jitsiurl", "jitsiconfig", "jitsiclientconfig" + , "jitsiroomadmintag", "jitsiinterfaceconfig" + , "openwebsitepolicy", "openwebsiteallowapi" + , "allowapi" ] + -> forbidProperty name | otherwise -> warn $ "unknown property type " <> prettyprint name where - isForbidden = forbidProperty name requireProperty req = propertyRequiredBy req name isUnsupported = warn $ "property " <> name <> " is not (yet) supported by walint." deprecatedUseInstead instead = |