Closed TNick closed 7 months ago
On the other hand setting permissions_default_allow
in tenantConfig.json
to true
and adding a permission to a layer for users
role prevents the layers with a ConfigDB ID larger than that layer to disappear from the results of the identify tool.
What a mess.
The way to achive this, should be very simple:
permissions_default_allow
to true
The map itself should be visible for everyone and the layer only for users, which are logged in.
Regarding permissions_default_allow: false
: you would need to permit the entire hierarchy to the desired layer, including the root WMS layer name. So i.e. for the qwc_demo
theme, to permit only the edit_points
layer, you'd need to:
qwc_demo
mapqwc_demo
root layeredit_demo
group layeredit_points
layerThe reason for this is that the permission structure allows you to permit/restrict also layer groups. Note that permissions_default_allow: false
is uncommon and it is much simpler to work with permissions_default_allow: true
.
Regarding the featureinfo permissions, I believe there was indeed a bug when used with permissions_default_allow: false
, I've fixed it in qwc-config-generator v2024.04.16.
@danceb Is there something special about the user groups or we can simply associate the user with the role?
This should work?
permissions_default_allow
to true
With this setting and this tenant config
The result is this
I can confirm that, when using the code checked today out from the GitHub repositories to build the docker images, the layer can be made available only to registered users.
I have not revisited the original problem with permissions_default_allow
set to false
.
The end purpose is to hide a layer from the map from public but make it available to the users.
I was expecting that
permissions_default_allow
intenantConfig.json
tofalse
public
to view a map resourcewould result in showing the theme without any layers.
It is not clear to me if and how a layer can be restricted to registered users.