Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
walint
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
hub
walint
Commits
78e6f692
Commit
78e6f692
authored
3 years ago
by
stuebinm
Browse files
Options
Downloads
Patches
Plain Diff
allow openWebsiteAllowApi if website is on static.rc3.world
parent
e3d6b59b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Properties.hs
+12
-2
12 additions, 2 deletions
lib/Properties.hs
with
12 additions
and
2 deletions
lib/Properties.hs
+
12
−
2
View file @
78e6f692
...
...
@@ -27,6 +27,7 @@ import Badges (Badge (Badge),
BadgeArea
(
BadgePoint
,
BadgeRect
),
BadgeToken
,
parseToken
)
import
Data.Data
(
Proxy
(
Proxy
))
import
Data.Functor
((
<&>
))
import
Data.List
((
\\
))
import
Data.Maybe
(
fromMaybe
,
isJust
)
import
Data.Set
(
Set
)
...
...
@@ -471,9 +472,18 @@ checkTileLayerProperty p@(Property name _value) = case name of
->
do
{
isString
p
;
requireProperty
"bindVariable"
}
|
T
.
toLower
name
`
elem
`
[
"jitsiurl"
,
"jitsiconfig"
,
"jitsiclientconfig"
,
"jitsiroomadmintag"
,
"jitsiinterfaceconfig"
,
"openwebsitepolicy"
,
"openwebsiteallowapi"
,
"allowapi"
]
,
"openwebsitepolicy"
,
"allowapi"
]
->
forbidProperty
name
-- the openWebsite Api can only be allowed if the website is on static.rc3.world
|
T
.
toLower
name
==
"openwebsiteallowapi"
->
do
properties
<-
askContext
<&>
getProperties
unless
(
all
(
\
(
Property
name
value
)
->
case
value
of
StrProp
str
->
name
/=
"openWebsite"
||
"https://static.rc3.world"
`
isPrefixOf
`
str
_
->
True
)
properties
)
$
complain
"
\"
openWebsiteAllowApi
\"
can only be used with websites hosted
\
\
on https://static.rc3.world"
|
name
`
elem
`
[
"openWebsite"
,
"openTab"
]
->
do
uselessEmptyLayer
suggestProperty
$
Property
"openWebsiteTrigger"
(
StrProp
"onaction"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment