Open RicardCots opened 2 months ago
Fixed on commit 0333c219f7535bb2bd8d0c69c6f7d229e1d4825f
Now, when one or more layers of the tree are not accessible for any reason, the app no longer displays any type of error message; it simply removes those layers from the tree and proceeds to load the viewer.
@RicardCots @mvinent @silmeUsil0001 please review this solution. IMHO, quiet removal of layers is a bad idea. It make impossible to users to realize a bad configuration and notify to SITMUN administrators of the issue.
Layers may be removed, but not silently as the commit implies!
I thought that no type of error should appear. If you want, I can add back the little toast message that appeared when loading an application in case a layer couldn't be loaded.
Note that several layers may have problems (not only one). Also, I recommend to report it in the console log.
In SITMUN 2 we often use the same tree for different users, and each user only gets the layers he has access to. This is a feature that simplifies the management, since we would otherwise have to generate many, many different trees, one for each role/territory.
So in my opinion the user should not receive any error or information message. On the other hand, it would be interesting for the SITMUN system administrator to know which layers are in the tree but are not loaded, but not for the user. Maybe it would be enough reporting it in de console log.
Commit 5c6c82b8d93b67bf753b4530ed030d866b1bd6ae add console log type messages when one or more layers cannot be accessed, instead of showing the old toast type error messages.
Describe the bug When the SITMUN viewer tries to load a tree containing one or more layers for which that user or territory does not have permission, and which are part of a node where no other layer has permission, the tree is not loaded in the viewer.
In other words, if the tree you are trying to open contains any node with layers without permissions for this user, the tree will not be loaded.
To Reproduce Steps to reproduce the behavior:
Expected behavior Se espera el mismo comportamiento que en SITMUN 2. Si en un arbol hay una o varias capas definidas para las que un usuario no dispone de permisos de acceso, se cargan todas las capas excepto esas. Independientemente de si hay un o varias capas sin permisos.
Screenshots First add a folder and a layer in the tree. Be sure the layer has not permissions for the user / aplication 7 territory.
See the error
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.