Skip to content

Commit 4952031

Browse files
Update the local config to disable the plugins for view access
1 parent 7e274eb commit 4952031

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

geonode_mapstore_client/static/mapstore/configs/localConfig.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@
580580
"type": "link",
581581
"href": "{'#/dataset/' + (state('gnResourceData') || {}).pk + '/edit/data'}",
582582
"labelId": "gnviewer.viewData",
583-
"disableIf": "{state('gnResourceData') && ['raster', '3dtiles'].includes(state('gnResourceData').subtype)}"
583+
"disableIf": "{(state('gnResourceData') && ['raster', '3dtiles'].includes(state('gnResourceData').subtype)) || !state('selectedLayerPermissions').includes('download_resourcebase')}"
584584
}
585585
]
586586
},
@@ -658,7 +658,8 @@
658658
},
659659
{
660660
"type": "plugin",
661-
"name": "FilterLayer"
661+
"name": "FilterLayer",
662+
"disableIf": "{!state('selectedLayerPermissions').includes('download_resourcebase')}"
662663
},
663664
{
664665
"type": "link",
@@ -1916,15 +1917,19 @@
19161917
"name": "AddLayer"
19171918
},
19181919
{
1919-
"name": "FilterLayer"
1920+
"name": "FilterLayer",
1921+
"cfg": {
1922+
"disablePluginIf": "{!state('selectedLayerPermissions').includes('download_resourcebase')}"
1923+
}
19201924
},
19211925
{
19221926
"name": "ScaleBox"
19231927
},
19241928
{
19251929
"name": "FeatureEditor",
19261930
"cfg": {
1927-
"primaryKeyAttributes": ["fid"]
1931+
"primaryKeyAttributes": ["fid"],
1932+
"disablePluginIf": "{!state('selectedLayerPermissions').includes('download_resourcebase')}"
19281933
}
19291934
},
19301935
{

0 commit comments

Comments
 (0)