I would like to ask, if there is a build in way to restrict users to specific areas in a map.
What I'm looking for is a way to assign areas by id or something to users. I would like to create a map and assign areas to users, so if a users logs in, he only sees his part/area of the map.
If there is no build in way, is it possible to add custom properties to users, by extending the portal and then implement this logic myself?
There is no out-of-box solution for this.
You can set definitionExpression to Featue Layer in your custom JS app.
You can create and populate your Feature Layer's Field with username values. Next after logging in, pass the typed username value to the definitionExpression.
Hope this helps,
Thanks for your response.
I thought about something like you mentioned, but one problem would be that this is way would not be secure.
Because there is not way i could check on the server side, if the user changed the definition query client side.
So the user could manipulate the query or remove it and see areas wich he has no rights for.
Could i implement server side code in Portal, if I had a standalone version?
So that i can check on every user request, wich user sends the request and than check if the parameters are valid?
You can create an SOI to ArcGIS for Server.
Check this presentation: http://proceedings.esri.com/library/userconf/devsummit16/papers/dev_int_170.pdf slide 29 and 30
and associated video recording: Home | Esri Video.
It might be helpful,