Layer Definition using current user/identity

Discussion created by tr3v on Jul 29, 2013
Latest reply on Jul 31, 2013 by manojrajteli
I am trying to establish a way of partitioning layers based on a user/role in a web viewer.

I currently have a web application (.Net MVC) that has an embedded map. I use the current authenticated user together with layer definition queries to get the "appropriate" data for that user. This allows me to have a single map service with all data in it, yet control visibility/access on a per user basis.

This works fine, but now I have been tasked with getting a generic web viewer (JavaScript) working in the same way. Worst case scenario is creating a web viewer (and maybe map service) for each role but I suspect there is a better way. I have been trying to find examples without any success. Maybe my approach is wrong.

Can someone point me in the right direction?