Mapguide 3.0 layer permissions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapguide 3.0 layer permissions

Kajar
I'm little confused how permission management working for Mapguide.
What I want to do is setup user rights to view or not to view some layers.
When user logs in then some layers are not accessible.
When I specify users who can have right to view specific layer then for them application opens, but for those users which is not in the list to view specific layer the application not opening at all.
I adding or removing rights using layer Properties and Permission tab for that.
How is the correct way to get this working?
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 3.0 layer permissions

Liglio
This post was updated on .
You must know which layers are visible for the user before opening the map, and then set these layers visible. First you must set all layers not visible at start up in the map library.
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 3.0 layer permissions

Kajar
So when map loads all layers must be turned off? But I need some rights based layers  initially be visible for users who can have rights to view it.
Its good to have that those layers  not visible at all also in  legend, when user have not right to view those layers.


 
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 3.0 layer permissions

Liglio
In maestro in map configuration you set layers initially not visible. When you will show the map you set the layers that you want to be visible, based on the user permissions.
Do you know how to set a layer visible in your code ?
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 3.0 layer permissions

Kajar
I just thought this layer rights management is done using only maestro or AIMS Studio.
But as I understood there is need to go to code level to set layers visible or not when map loads.
Actually I dont know how to set layers visibility in code based user rights ;).
I just use predefined web templates without any additional coding.
If you can point me a right way how to add  this layers visibility in code, I'll be really thankful.
Does this coding means changing template index.html?

Kajar


Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 3.0 layer permissions

Liglio
This post was updated on .
When you install mapguide open source, some examples and a help are installed. See the example "C:\Program Files\OSGeo\MapGuide\Web\www\dotnetsamples\modifying_maps_and_layers". The help is "http://localhost/mapguide/help/webapi/" and "http://localhost/mapguide/help/viewerapi/". You have to code to control layer visibility for each user.