What would be the best way to manage permissions for regional managers and regional agents.
We are going to have all the information on a spatial db like sql or postgres
And we think we could with an administrator system define some polygons and with that limits establish or name a user and password for that area. Or maybe we could define for each object id. The user who has permission and do not connect the permissions with spatial information.
We want the manager only see the stores and region he have permission to modify.
What would be your advice
Permissions and multi user approach
Hi Rodrigo,
As a reminder, if possible, we recommend to use the sql server as if we want to use postgre, we need to use other production “MapSuiteSpacialDataExtension” to support postgre and the more important thing is it is not released any more and we also don’t have the plan to do the support in the future.
As for your case, I guess we can add a permission column into records and the column includes all the user who have the permisson to modify its geometry. Once we have the column, then it can map a column of the feature and we can search those feature with the below codes:
var currentUserFeatures = featuresource.ExecuteQuery(“SELECT * FROM Roads WHERE permission = ‘userid’”);
or
var currentUserFeatures = featuresource.GetFeaturesByColumnValue(“permission”, “userid”);
Hope it helps.
Regards,
Johnny
ok so i could have for example.in a table for states
id STATE permission Spatial
5 Texas rwolburg 0x00000…
and get all the information from all the layers?
var currentUserFeatures = featuresource.ExecuteQuery(“SELECT * FROM Roads Whitin (select * from estates permission = ‘userid’”);
var currentUserFeatures = featuresource.ExecuteQuery(“SELECT * FROM urban blocks Whitin (select * from estates permission = ‘userid’”);
var currentUserFeatures = featuresource.ExecuteQuery(“SELECT * FROM Shops Whitin (select * from estates permission = ‘userid’”);
var currentUserFeatures = featuresource.ExecuteQuery(“SELECT * FROM agebs Whitin (select * from estates permission = ‘userid’”);
etc…
or maybe with thinkgeo.com/forums/MapSuite…fault.aspx
get the bounding box for all the state and then based on this object query all the layers…
That would be more efficient?
??
Hi Rodrigo,
For the first way, it do the query in Sql Server directly and the performance should be fine and the second way needs one more connections. But I am also confused that I didn’t find any relationships between those two method as seems like they do the different works.
BTW, I don’t think the T-Sql in your above codes can work based on T-SQL syntax.
If there is anything I misunderstand, don’t hesitate to correct me.
Regards,
Johnny