On Thu, Apr 17, 2014 at 6:32 PM, Kevin Smith <ksm...@boundlessgeo.com>wrote:
> That isn't for CatalogFilterAccessManager, it's for CatalogFilter, and it
> doesn't take an Authentication parameter because none of the existing
> methods on that interface take that parameter.
> CatalogFilterAccessManager's toFilter method can then call toFilter on its
> delegate and each of its CatalogFilters and combine the results to get the
> final filter.
>
I see. There is no toFilter method in your proposal, you mean
getSecurityFilter yes?
toFilter would imply some sort of conversion, getSecurityFilter (or
getCatalogFilter if you like) seem more appropriate.
>
> Doing a bit of preliminary implementation, I have noticed I may have
> missed one thing. I think the toFilter methods are going to need a
> reference to the catalog, so the signatures would be Filter
> ResourceAccessManager.toFilter(Authentication user, Class<? extends
> CatalogInfo> clazz, Catalog catalog) and Filter
> CatalogFilter.toFilter(Class<? extends CatalogInfo> clazz, Catalog
> catalog) Alternatively, those specific implementations that need a catalog
> could have it as a member, but the specific cases that most need it are the
> default implementations for the abstract base classes
> AbstractResourceAccessManager and AbstractCatalogFilter.
>
I would avoid polluting the interface with a reference to catalog, we live
in a spring world, implementation can either have it injected (better), or
call GeoServerExtensions.bean("catalog")
(uglier, still working) to grab a reference if they need to
Cheers
Andrea
--
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel