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
257 stars 143 forks source link

[Bug]: download button in pop up should not show if download/export is not allowed globally #3562

Open gioman opened 1 year ago

gioman commented 1 year ago

What is the bug?

is there any reason why the download button in LMWC pop up should show even if the functionality is not allowed for a specific group globally, in LMWC backend?

i.e. there seems to be a scenario where for an anonymous users I can see

image

despite

image

Steps to reproduce the issue

See above.

Versions

LMWC latest 3.6 QGIS Server/Desktop latest 3.28 LM plugin latest 3.11

Check Lizmap plugin

QGIS server version, only if the section above doesn't mention the QGIS Server version

3.28

Operating system

Ubuntu 22.04, desktop and server

Browsers

Firefox, Chrome

Browsers version

latest

Relevant log output

No response

Gustry commented 1 year ago

I might be wrong, but I think this is also on purpose (for now).

Similar to #3561, there isn't any link between "download a layer" and "download a feature".

It's two different features and user target. You can disable the download of a feature in your Lizmap plugin with the checkbox "allow download".

This button has been added mainly for non GIS users, like on a bicycle information map, to download the GPX track on a phone (that's why GPX and KML are proposed and not GIS formats such as shapefile).

But we are keen to discuss, do not worry and I understand your point of view.

Gustry commented 1 year ago

if my colleague confirm, maybe I should be more explicit in the plugin in the tooltip.

gioman commented 1 year ago

It's two different features and user target. You can disable the download of a feature in your Lizmap plugin with the checkbox "allow download".

This button has been added mainly for non GIS users, like on a bicycle information map, to download the GPX track on a phone (that's why GPX and KML are proposed and not GIS formats such as shapefile).

But we are keen to discuss, do not worry and I understand your point of view.

@Gustry I understand your point (download feature is not the same as download layer), but I think that there is also a strong use case for not wanting to allow at all to download single features if the download layer functionality is not allowed (see also https://github.com/3liz/lizmap-web-client/issues/217#issuecomment-1476649824), not even if the "add a download button" checkbox is enabled.

Or maybe the easiest solution would be in LM Plugin:

"add a download button" unchecked by default

and

a new checkbox that "forces" to use the global permissions for repos (already implemented) and/or the by layer/project (yest to be implemented https://github.com/3liz/lizmap-web-client/issues/217#issuecomment-1476649824)

3liz-bot commented 1 year ago

This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎

gioman commented 1 year ago

I still think I have a point here ;)

3liz-bot commented 1 year ago

This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎

gioman commented 1 year ago

I still think I still have a point here ;)

gioman commented 1 year ago

Bumping my tickets before they go "quite",