Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a branch breaks, a tree falls down #56

Open
RicardCots opened this issue Sep 20, 2024 · 6 comments
Open

When a branch breaks, a tree falls down #56

RicardCots opened this issue Sep 20, 2024 · 6 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@RicardCots
Copy link

RicardCots commented Sep 20, 2024

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:

  1. Go to SITMUn administrator - tree and configure a new folder with one or more layers, being sure that those layers have no permission for that aplication/territory it's going to be used.
  2. Open the related Viewer.
  3. See how it does not load the layer and throws a generic error (see atached image)

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.
image

See the error
image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@fjlopez fjlopez added the bug Something isn't working label Sep 20, 2024
@mvinent mvinent self-assigned this Oct 17, 2024
@mvinent mvinent added the question Further information is requested label Oct 17, 2024
@daniboube
Copy link
Contributor

Fixed on commit 0333c21

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.

@fjlopez
Copy link
Contributor

fjlopez commented Nov 6, 2024

@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!

@daniboube
Copy link
Contributor

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.

@fjlopez
Copy link
Contributor

fjlopez commented Nov 6, 2024

Note that several layers may have problems (not only one). Also, I recommend to report it in the console log.

@RicardCots
Copy link
Author

RicardCots commented Nov 6, 2024

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.

@daniboube
Copy link
Contributor

Commit 5c6c82b add console log type messages when one or more layers cannot be accessed, instead of showing the old toast type error messages.

@fjlopez fjlopez assigned silmeUsil0001 and mvinent and unassigned mvinent Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants