Hello,
I setup a PostGIS data store and layer containing geometries created by
users. Based on the user accessing the layer, I would like to force a
filter within geoserver in order to only return features they own. Where
would be the best place to start - I'm pretty new to geoserver. Can I
extend geoserver and inject cql filters somehow - which classes should I
look at?
Thanks!
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Dynamic-filter-by-user-tp5066910.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
On Wed, Jul 17, 2013 at 4:17 AM, dapriett <dprietti@anonymised.com> wrote:
Hello,
I setup a PostGIS data store and layer containing geometries created by
users. Based on the user accessing the layer, I would like to force a
filter within geoserver in order to only return features they own. Where
would be the best place to start - I'm pretty new to geoserver. Can I
extend geoserver and inject cql filters somehow - which classes should I
look at?
You should implement your own ResourceAccessManager and declare it
in the Spring context.
There are also ready made solutions with a GUI to configure the access
rules, have a look
at GeoFence here:
https://github.com/geosolutions-it/geofence
Of course, that also provides an example of implementing and registering a
ResourceAccessManager:
https://github.com/geosolutions-it/geofence/blob/master/src/geoserver22x/security/src/main/java/it/geosolutions/geofence/GeofenceAccessManager.java
https://github.com/geosolutions-it/geofence/blob/master/src/geoserver22x/security/src/main/resources/applicationContext.xml
Cheers
Andrea
--
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
-------------------------------------------------------