3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
254 stars 143 forks source link

Use of the "__anonymous" group for projects/(layers) groups/layers visibility #4233

Open gioman opened 6 months ago

gioman commented 6 months ago

What is the question? (in English)

I was under the assumption that the "__anonymous" group was a (special) group that contained everyone visiting LWC while not logged.

But that do not seems to be the case as if I specify "anonymous" for a "group visibility" property, the project/layer/etc is not visible also for not logged users, almost as if "anonymous" is considered as a real group.

The difference between leaving "group visibility" empty and using the "anonymous" group is clear, and is between showing something always (user logged or not) and showing something when a user visits LWC while not logged.

Did I get it wrong? Or is not working as expected?

Versions, safeguards, check summary etc

LMWC 3.6.10 QGIS Desktop/Server 3.28.15 LM plugin 4.2.2

Check Lizmap plugin

Operating system

Ubuntu 22.04

Browsers

Firefox, Chrome

Browsers version

Latest updates

Relevant log output

No response

gioman commented 6 months ago

I understand now (because I really never had a similar use case before) that the logic is the same used when choosing roles/groups in LWC repositories permissions: "anonymous" applies to everyone, logged or not so not only to not logged ones (which is a bit counter-intuitive also with the difference that in LWC backoffice "anonymous" must be checked and in LM plugin the visibility property must be left blank, which is a bit consistent I guess).

Anyway I think there are use cases where it would be desirable to have "anonymous" really apply to only users that are not logged.

Gustry commented 2 months ago

Anyway I think there are use cases where it would be desirable to have "anonymous" really apply to only users that are not logged.

It's technically possible if you put a single comma I think. But this is very hacky. A proper way should added indeed.

gioman commented 2 months ago

It's technically possible if you put a single comma I think. But this is very hacky. A proper way should added indeed.

@Gustry thanks, I will give it a try. The label for this ticket should be changed I guess.