I’m trying to find a way to filter some features by the logged in user in my project.
Example:
– Record 1 of Feature A can only be accessed by user X
– Record 2 of Feature A can only be accessed by user Y
– Record 3 of Feature A can be accessed by user X and Y
Is it possible directly with geoserver or geofence?
I also have this requirement and didn’t find a direct solution. As I’m running GeoServer behind a self-written reverse proxy that is authenticating the windows logon user to GeoServer, I’m able to use the view parameter mechanism to change the filter depending on requested layer and current user.
But this might not be possible in your situation.
I also would be interested in different ways to achieve this.
Would it be possible to access the name of the current user inside the CQL to allow access only to records where the name of user is stored in an attribute, like f.e.
Looks like it is already done (see search result above for AutopopulateTransactionCallback “GSUser” ). If you like the idea you could do something similar for WMS GetMap and other requests.
Thans @dcal , but I think with that solution anyone can copy and paste the request with that “OWNER” filter, and it will be available to see the entire data set.