I'm sorry to bother you more. With the examples provided I can easily set up my role permissions, but it works on layers only: the accessControlFilter.layerPermissions doesn't seem to take care of layer groups in the GetCapabilities request. If the layer group has 0 layers because none of the sublayers is readable by the authenticated user, it still remains in the GetCapabilities response.
Is it possible to exclude a group with 0 layers in the GetCapabilities response? Or better: Is it possible to apply the AccessControl plugin to a layer group? Thanks in advance Il giorno lun 21 giu 2021 alle ore 19:23 Marco Casalboni < [email protected]> ha scritto: > I followed the examples and It works likes a charm, many thanks > > Il lun 21 giu 2021, 10:19 Luigi Pirelli <[email protected]> ha scritto: > >> Old but good article (in Spanish) by German Carrillo about contiguring >> access credential granularity to QGIS Server data >> >> >> https://geotux.tuxfamily.org/2019/05/07/accediendo-a-datos-de-qgis-server-con-base-en-roles-de-usuario/ >> >> Luigi Pirelli >> >> >> ************************************************************************************************** >> * LinkedIn: https://www.linkedin.com/in/luigipirelli >> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli >> * GitHub: https://github.com/luipir >> * Book: Mastering QGIS3 - 3rd Edition >> <https://www.packtpub.com/eu/application-development/mastering-geospatial-development-qgis-3x-third-edition> >> * Hire a team: http://www.qcooperative.net >> >> ************************************************************************************************** >> >> >> On Mon, 21 Jun 2021 at 10:07, Marco Casalboni <[email protected]> >> wrote: >> >>> Thank you for the accurate informations, this will be very helpful. >>> >>> One more thing: is it possible to filter the wms GetCapabilities >>> request's layer list according to an authenticated user (or role)? >>> >>> regards, >>> >>> Marco >>> >>> Il giorno ven 18 giu 2021 alle ore 03:29 Germán Carrillo < >>> [email protected]> ha scritto: >>> >>>> Hi Marco, >>>> >>>> >>>> I published a blog where I configured permissions based on user roles >>>> for a QGIS Server workshop. >>>> Keep in mind that it was just a demo. It was based on some plugin >>>> examples by Alessandro Pasotti. >>>> >>>> One single project, one single WMS, several user roles and different >>>> permissions (based on spatial and non-spatial filters) per role. >>>> >>>> You can read here [1] the instructions. >>>> They are unfortunately only in Spanish. Even though I created an >>>> English version, we are migrating the whole website at the moment, so it's >>>> unavailable. >>>> I hope you manage to translate them. >>>> >>>> >>>> BTW, according to your use case, you would need to focus on >>>> "layerPermissions" (see the link Thomas posted earlier in this thread). >>>> >>>> >>>> Regards, >>>> >>>> Germán >>>> ------------ >>>> [1] >>>> https://geotux.tuxfamily.org/2019/05/07/accediendo-a-datos-de-qgis-server-con-base-en-roles-de-usuario/#qs-10 >>>> >>>> >>>> El jue, 17 jun 2021 a las 16:45, Thomas Gratier (< >>>> [email protected]>) escribió: >>>> >>>>> Hi, >>>>> >>>>> You may create a QGIS Server plugin to manage your permissions e.g >>>>> https://docs.qgis.org/3.16/en/docs/pyqgis_developer_cookbook/server.html#accesscontrol-py >>>>> >>>>> Regards >>>>> >>>>> Thomas >>>>> _______________________________________________ >>>>> Qgis-user mailing list >>>>> [email protected] >>>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user >>>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user >>>>> >>>> >>>> >>>> _______________________________________________ >>> Qgis-user mailing list >>> [email protected] >>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user >>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user >>> >>
_______________________________________________ Qgis-user mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
