Auto hide layers in a webmap according to the users credentials instead of error message about loading a layer

784
4
06-23-2023 05:11 AM
Status: Open
Stefan_Thorn
Occasional Contributor II

When an user is not authorized to see certain data/layers in webmap because he is not a member of a group, the error appears

Stefan_Thorn_0-1687520599529.png

But is there a way to auto hide layers in a webmap when an user is opening a viewer?

Use case:

I have created one GIS viewer, added the necessary data to this GIS viewer. Different stakeholders have access to this GIS viewer and it depends on their role which information they can access. Stakeholders are assigned to different groups, as well the GIS data they have access too.

One GIS viewer is much easier to maintain than multiple GIS viewers per stakeholder. If layers are auto hide related to the logged in user it will looks more professional then the error message.

4 Comments
DataOfficer

I agree this would be a much cleaner workflow (though can understand why there is an error message). We currently have to have multiple maps and webapps for different user groups, when it would be more straightforward to be able to control view permissions of layer within a map accessible by multiple Groups.

jcarlson

What goes into configuring your single viewer? It's entirely possible to use a single "master copy" and have its changes propagate to "child" items. If the only differences between them are the operational layers, it's not too hard to set up.

If unavailable layers were simply hidden, how would you differentiate between ones you "hide" and legitimate errors?

MikeMinami

Hi

It isn't really feasible for AGOL to specifically auto hide layers due to lack of access. The challenge is that AGOL doesn't know why the layer returns an error. In your case, when someone else looks at your map who doesn't have access to your layer, AGOL doesn't know that the layer exists but that this person just doesn't have permission to see it. To AGOL, from the perspective of that other person, the layer doesn't exist. Thus, AGOL can't identify layers with errors due to sharing differences. 

Map Viewer does check when saving a map to ensure that all layers are shared the same way as the containing map. This should help alleviate layer sharing problems for the intended audience. 

thanks!

 

 

CPaulman

We have a workflow where we want to have 1 application for all users. We would like to have views in our web map that determine the data different users are allowed to see. It would be great if the users just saw the view that was meant for thier group/role and wasn't bothered by broken links for views that were never intended for them. 

Maybe a solution would be in WebExperience Builder, add a toggle in the web map to "hide broken links" and if this is checked the user doesn't see the layer or a broken link message.