Hi, "Is it possible to decide which users can access which features in a layer?" I'm using the following solution for postgis datastore/layer:
* set a Session startup SQL (and session close-up SQL) in the datastore. This will set a variable with the current GeoServer user. e.g. startup "SELECT set_config('myapp.user', '${GSUSER,geoserver}', FALSE) close-up "SELECT set_config('myapp.user', '', FALSE) * create a sql view, restricting the returned records with the set variable (current_setting('myapp.user', TRUE)) normally you would have an additional table in your database with mapping of usernames to records/spatial entities Regards, Stefan Am 29.10.2018 um 12:36 schrieb Nanaso via Geoserver-users: > Hi, > Thanks a lot Nuno for your reply. > There are two issues: > 1- The Geofence extention can satisfy my needs in the following way: I > have an attribute in my layer called "user_name", I can check if the > logged in username equals to this attribute, then I will allow the > logged in user to access this feature, and vise versa. > The problem is how to get the current logged in username. Is there an > environment varaible that holds the current logged in user? > > 2- The other issue is regarding installation of Geofence. I've tried > to install version 13 of Geofence extention in a Geoserver of version > 13, it works fine, but the place where I should enter the CQL filter > is not exist. According to the documentation: > https://docs.geoserver.org/stable/en/user/community/geofence-server/gui.html#rule-page > There should be a place to specify the CQL fitler for read and write. > But it looks like this part of the configuration doesn't exist in > version 13 of Geofence. > I've then tried to install verison 14 of Geofence in a veriosn 14 of > Geoserver, but the server failed to launch with many exceptions. My > machine is Mac OS High Sierra. And here you're the exceptions I > recieve when launching geoserver after adding Geofence to it: -- ========================================= Dipl.Ing. Stefan Overkamp tel: 02052 / 814184 mobil: 0177 / 7976159
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users