-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Nested Locales with Nested Roles
Nested roles needs to work with nested locales
A locale can have a role defined on the locale template or object. If a user
has the role they have access to the locale.
In that locale there are multiple locales that we can merge into. These locales
also have a role defined on their templates/objects, where if a user has the
relevant role they will have access to the nested locale.
-- Workspace
{
"locales": {
"germany": {
"template": "germany_template",
"locales": ["globalvista_template"]
},
"uk": {
"template": "uk_template",
"locales": ["globalvista_template", "coremarkets_template"]
}
}
}-- Germany Template
{
"role": "germany",
"layers": {
"OSM_GERMANY": {
"display": true,
"format": "tiles",
"URI": "https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",
"attribution": {
"© OpenStreetMap": "http://www.openstreetmap.org/copyright"
}
}
}
}-- GlobalVista Template
{
"role": "globalvista",
"layers": {
"OSM_GLOBALVISTA": {
"display": true,
"format": "tiles",
"URI": "https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",
"attribution": {
"© OpenStreetMap": "http://www.openstreetmap.org/copyright"
}
}
},
"locales": ["brand_a_template", "brand_b_template"]
}-- brand a
{
"role": "brand_a",
"layers": {
"OSM_BRAND_A": {
"display": true,
"format": "tiles",
"URI": "https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",
"attribution": {
"© OpenStreetMap": "http://www.openstreetmap.org/copyright"
}
}
}
}We expect the roles returned from the workspace to be
{
"roles": [
"germany",
"globalvista",
"brand_a",
"germany.globalvista",
"germany.globalvista.brand_a"
]
}Metadata
Metadata
Labels
No labels