Hi,
I have a table like this:
ID | Name | the_geom | Owner
The field ‘Owner’ store the user name who own this record.
Here is my question:
Is there any possible way that we can use web request as usual ,### but response base on the user who invoke the request.
Thanks for help.
On Mon, Sep 2, 2013 at 3:28 AM, Jiang Wang <sillyemperor@anonymised.com> wrote:
Hi,
I have a table like this:
--------------------------------------------
ID | Name | the_geom | Owner
--------------------------------------------
The field 'Owner' store the user name who own this record.
Here is my question:
Is there any possible way that we can use web request as usual , but
response base on the user who invoke the request.
I don't think you can set it up the way you want out of the box.
Theoretically one could use parametric sql views to get close, but you
would not have
any way to get the current GeoServer user to inject it as a parameter in
the sql, however the current user is not available as a "view parameter",
some
code in GeoServer would have to be modified to get it there... besides, you
would
not be able to apply security on all OGC protocols that way.
A better approach would be for you to write your own ResourceAccessManager
implementation
(in Java) and plug it into GeoServer. You can have a look at the
DefaultResourceAccessManager
implementation as an example (there are no other docs):
https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/security/DataAccessManagerAdapter.java
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
-------------------------------------------------------