[Geoserver-users] How to determine is layer closed for editing or don't without Geoservers web-interface?

Hi,

Is suppose that the standard way would be to advertise the supported operations for each layer in GetCapabilities in WFS 1.0.0 it would be like

<FeatureType><Name>lv:editable_multipoints</Name>
<Title>Editable test layer with multipoint geometries</Title>
<SRS>EPSG:3067</SRS>
<Operations>
<Insert/>
<Update/>
<Delete/>
</Operations>
<LatLongBoundingBox minx="22.897012" miny="61.978491" maxx="29.155145" maxy="67.392921"/>
</FeatureType>

With standard controls Geoserver turns on of of WFS-T for the whole service and operations are listed at a higher level in FeatureTypeList
<FeatureTypeList>
<Operations>
<Operation>Query</Operation>
<Operation>Insert</Operation>
<Operation>Update</Operation>
<Operation>Delete</Operation>
<Operation>Lock</Operation>
</Operations><FeatureType>

Check the GetCapabities of your secured system and see if the supported operations are listed for each feature type according to your security settings. If they are, you have fond the place to look at.

-Jukka Rahkonen-

Пашинский Сергей wrote:

Hi to all!

In my work i am using a GeoServer to store my vector and raster data. I am
making a web-client based on openlayers for displaying data from
GeoServer.
My client consist of 2 parts:
1) catalogue, where i list to user list of layers, stored in GeoServer
2) map, where data are displayed

I want not only view data, but modify vector data in client using WFS-T. I am
using standard GeoServer security system for control permissions for layer
editing.
Some layers are closed for editing, and some don't. User need to know,
which layers are editable.
For this reason, i want to mark in my catalogue those layers, which could be
modified.

My problem is how to determine in my client, which layer is closed for editing
and which is not.

Can i do it using REST or somehow else?

My GeoServer version is 2.3

Thanks,
Sergey

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced analytics
on semi-structured data. The platform includes APIs for building apps and a
phenomenal toolset for data science. Developers can use our toolset for
easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Thu, Apr 18, 2013 at 9:06 AM, Rahkonen Jukka
<jukka.rahkonen@anonymised.com>wrote:

Hi,

Is suppose that the standard way would be to advertise the supported
operations for each layer in GetCapabilities in WFS 1.0.0 it would be like

<FeatureType><Name>lv:editable_multipoints</Name>
<Title>Editable test layer with multipoint geometries</Title>
<SRS>EPSG:3067</SRS>
<Operations>
<Insert/>
<Update/>
<Delete/>
</Operations>
<LatLongBoundingBox minx="22.897012" miny="61.978491" maxx="29.155145"
maxy="67.392921"/>
</FeatureType>

With standard controls Geoserver turns on of of WFS-T for the whole
service and operations are listed at a higher level in FeatureTypeList
<FeatureTypeList>
<Operations>
<Operation>Query</Operation>
<Operation>Insert</Operation>
<Operation>Update</Operation>
<Operation>Delete</Operation>
<Operation>Lock</Operation>
</Operations><FeatureType>

Check the GetCapabities of your secured system and see if the supported
operations are listed for each feature type according to your security
settings. If they are, you have fond the place to look at.

Doing that layer by layer would be possible, but at the same time, might be
expensive,
since we'd have to get each and every layer, gather its data source, and
see if it's writable.
If the store cache is big enough that might work just fine, if not we might
end up creating
and dropping either open files or database connections a lot

Looks to me like good material for a "improvement request" jira ticket.

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

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

-------------------------------------------------------

Do i understand correctly, that at this moment there isn’t way to check separately each layer is it writable or not? Will the method, proposed by Rahkonen, work, or it isn’t supported?
I changed geoserver standard sequrity rules fo layers and no it looks like:

..r *
..w NO_ONE
Test.*.w ROLE_DVO

23.04.2013, 11:32, “Andrea Aime” <andrea.aime@…1107…>:

On Thu, Apr 18, 2013 at 9:06 AM, Rahkonen Jukka <jukka.rahkonen@…486…> wrote:

Hi,

Is suppose that the standard way would be to advertise the supported operations for each layer in GetCapabilities in WFS 1.0.0 it would be like

lv:editable_multipoints

Editable test layer with multipoint geometries EPSG:3067

With standard controls Geoserver turns on of of WFS-T for the whole service and operations are listed at a higher level in FeatureTypeList


Query
Insert
Update
Delete
Lock

Check the GetCapabities of your secured system and see if the supported operations are listed for each feature type according to your security settings. If they are, you have fond the place to look at.

Doing that layer by layer would be possible, but at the same time, might be expensive,
since we’d have to get each and every layer, gather its data source, and see if it’s writable.
If the store cache is big enough that might work just fine, if not we might end up creating
and dropping either open files or database connections a lot

Looks to me like good material for a “improvement request” jira ticket.

Cheers
Andrea

==
GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information.

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


,


Try New Relic Now & We’ll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr

,


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Do i understand correctly, that at this moment there isn't way to check separately each layer is it writable or not? Will the method, proposed by Rahkonen, work, or it isn't supported?
I changed geoserver standard sequrity rules fo layers and no it looks like:

*.*.r *
*.*.w NO_ONE
Test.*.w ROLE_DVO

But i still get capabilities document with strings:
<FeatureTypeList>
<Operations>
<Operation>Query</Operation>
<Operation>Insert</Operation>
<Operation>Update</Operation>
<Operation>Delete</Operation>
<Operation>Lock</Operation>
</Operations><FeatureType>
...

And no any information about suported operations in FeatureType block

23.04.2013, 11:32, "Andrea Aime" <andrea.aime@anonymised.com>:

On Thu, Apr 18, 2013 at 9:06 AM, Rahkonen Jukka <jukka.rahkonen@anonymised.com> wrote:

Hi,

Is suppose that the standard way would be to advertise the supported operations for each layer in GetCapabilities in WFS 1.0.0 it would be like

<FeatureType><Name>lv:editable_multipoints</Name>
<Title>Editable test layer with multipoint geometries</Title>
<SRS>EPSG:3067</SRS>
<Operations>
<Insert/>
<Update/>
<Delete/>
</Operations>
<LatLongBoundingBox minx="22.897012" miny="61.978491" maxx="29.155145" maxy="67.392921"/>
</FeatureType>

With standard controls Geoserver turns on of of WFS-T for the whole service and operations are listed at a higher level in FeatureTypeList
<FeatureTypeList>
<Operations>
<Operation>Query</Operation>
<Operation>Insert</Operation>
<Operation>Update</Operation>
<Operation>Delete</Operation>
<Operation>Lock</Operation>
</Operations><FeatureType>

Check the GetCapabities of your secured system and see if the supported operations are listed for each feature type according to your security settings. If they are, you have fond the place to look at.

Doing that layer by layer would be possible, but at the same time, might be expensive,
since we'd have to get each and every layer, gather its data source, and see if it's writable.
If the store cache is big enough that might work just fine, if not we might end up creating
and dropping either open files or database connections a lot

Looks to me like good material for a "improvement request" jira ticket.

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information.

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

-------------------------------------------------------

,
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
,
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------- Завершение пересылаемого сообщения --------

On Mon, Apr 29, 2013 at 6:57 AM, Пашинский Сергей <pss47@anonymised.com> wrote:

Do i understand correctly, that at this moment there isn't way to check
separately each layer is it writable or not? Will the method, proposed by
Rahkonen, work, or it isn't supported?

It is not supported, as Jukka suggests we would have to provide the list of
available actions type by type.
There is no global way to know if edits are possible, the OGC service code
does not even know a security
subsystem exists, and it should not either to avoid entangling the code too
much.

However, if we were to make checks on a type by type basis, we'd be at
least able to know if a certain
layer is writable or not by looking at the data access interface we get
back from the data source
(FeatureStore, writable, or FeatureSource, read only).

That would need to be coded, see my other message in this thread

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

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

-------------------------------------------------------