One of our customers serves users in Portal 10.8.1 with built-in WAB (not WAB for developers).
Some of them are not permitted to see a layer. As expected, they get the error message (attached).
They are intimidated by this error message: The layer, XXX, cannot be added to the map.
He asks if there is a way to avoid this error message or maybe change it to : "cannot be added to the map because you are not permitted to" or something like that.
We know that it probably can be done by using SOI because he uses services referenced in ArcGIS Server (not hosted) but the customer is not familiar with this adventure.