>Could you share the details on how you extended the security configuration
files
>to put in them the info about the allowed bbox ?
I had to use many dataSource (like xml,bdd and ldap) and our right extended
(layer,bbox(s),service,request,filters etc are linked together in the geoRM)
so I wrote my own system and I think it would not be usefull for you.
I didn't use properties file like in
org.geoserver.security.DefaultDataAccessManager in order to correct the
problem with '.' in coordinate, I used xml (and avoid properties files). I
created DTOs (my own enveloppe) and for serialization/deserialization I used
Xstream (which is in geoserver too):
If you want one Bbox for one role and layer: (with xstream and alias you
have object direcly:)
<right>
<role>test</role>
<bbox>
<x1>-8236345.031824412</x1>
<x2>-8236346.031824412</x2>
<y1>4968280.5516899815</y1>
<y2>4971290.776477601</y2>
<crs> EPSG:900913</crs>
</bbox>
</right
auth = (Authentication) SecurityContextHolder
.*getContext*().getAuthentication();
*protected* *int* vote(org.geoserver.platform.Operation op, Authentication
user) {
GetMapRequest getMapRequest = (GetMapRequest)
op.getParameters()[0];
MapLayerInfo[] layersInfo = getMapRequest.getLayers();
org.geotools.geometry.jts.ReferencedEnvelope env =
*new*ReferencedEnvelope(
getMapRequest.getBbox(), getMapRequest.getCrs());
MyBbox
bbox=bboxManagerOrDao(auth.getGrantedAuthorities()[0],layersInfo[0]);
ReferencedEnvelope
env2=*new*ReferencedEnvelope(bbox.getX1(),bbox.getX1() , bbox.getX1()
, bbox.getX1()
,bbox.getCRS());
env2=env2.transform(getMapRequest.getCrs(), *true*);
boolean isIn=env2.contains((BoundingBox)env));
…
Fabien
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel