I believe you can use a direct EnvFunction call to extract the GSUSER
variable,
something like (mind, jotted down without any testing):
FilterFactory2 ff = ...
Function userFunction = ff.function("env", ff.literal("GSUSER)";
String user = userFunction.evaluate(null, String.class);
Cheers
Andrea
In other words, How can I (from inside the custom WPS process function) get the
username of the user that requests the WPS process ?
‐‐‐ Original Message ‐‐‐
On Saturday, November 3, 2018 3:14 PM, Nanaso via Geoserver-users
wrote:
> Hi,
> Thanks a lot Stefan and Andrea for your replies
Hi,
Thanks a lot Stefan and Andrea for your replies.
Now the solution of Stefan works perfectly in WMS and WFS requests (each
Geoserver user can view/update his own features only). The problem now is with
my custom WPS, I've many custom WPS functions that connect directly to the DB
(not through
On Mon, Oct 29, 2018 at 12:45 PM Nanaso via Geoserver-users <
geoserver-users@lists.sourceforge.net> wrote:
> 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",
Hi,
I don't think the WFS-Insert could resolve the postgresql function
current_setting().
You should insert your user data with SQL.
GeoServers SQL View can resolve current_setting() and can combine/join
it with your user data to return only records the current myapp.user
should see.
Regards,
St
Hi,
Thanks a lot Stefan for your perfect solution.
I have tested what you mentioned and it works pretty fine. But there is one
remaining issue. That is how to pass the current geoserver's username to the
database? I've a field in the geometries table called "user_name". It should
hold the owner
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
Hi,
GeoServer default security system will not allow you to do this:
In other words, is it possible to decide which users can access which
> features in a layer?
>
GeoServer GeoFence extension [1] will allow you to set rules based on a
spatial area or feature properties, not sure if that's what
Hi Geoserver users,
I know that you can set the security of each layer individually (decide which
users can access which layer).
My question is: is it possible to have a sub-layer security access control? In
other words, is it possible to decide which users can access which features in
a layer?