On Tue, Mar 1, 2011 at 1:19 AM, David Winslow <[email protected]> wrote:

> Ok this was simple and made the code smaller so I went ahead and refactored
> to use a GeometryFilter.
>
> Unless there's any objections, I'll go ahead and commit the latest patch on
> the ticket tomorrow.
>

Hi,
had a look at the current patch, I think I spotted a couple other issues.

The most serious one is that LocalWorkspaceDataAccessManager perform alien
logic
that was not part of the wrapped access manager in case the layer/resource
can be
exposed: I don't see a need to perform the intersection between the layer
rights
and the wrapped resource rights, and same goes for the resource vs
workspace.
The code should simply take what the wrapped resource access manager
returned
and pass it back without extra processing, it's not its role to ensure there
is proper
right containment between workspace, layer and resource.
Also consider that the current system allows for overrides, so one can have
no rights
to the workspace as a whole but there can be an override for a specific
layer, as far
as I can see the current code will break that behavior.

The second issue is more of a worry. When intersecting two geometries you
don't
check whether the result is an empty collection (symptom of no
intersection).
In that case the filter should probably be flipped to Filter.EXCLUDE instead
of
asking for an intersection with an empty geometry.
However, about this one I'm not completely sure, it may end up working fine
as is.

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to