Landry Breuil created GEOS-5507 |
Issue Type: |
Bug |
Affects Versions: |
2.2.2 |
Assignee: |
|
Components: |
REST |
Created: |
14/Dec/12 9:16 AM |
Description: |
Maybe linked to issue 5498, it seems not possible to assign a style to a layer via REST if the style is in a workspace and not global. By default ‘polygon’ style is assigned to a polygon layer. If i try via rest to assign it ‘ZAC_style’, i get a code 200, but the modification is not done on the layer. #curl -H"sec-username:breuil" http://localhost:8080/geoserver/rest/workspaces/public/styles/ZAC_style.xml <style> #curl -H"sec-username:breuil" http://localhost:8080/geoserver/rest/layers/ZAC.xml I’ve tried two things : modifiying the XML returned by a GET on the layer, sending the whole layer xml with only that part changed : <defaultStyle> or with a small definition of the layer inlined in the curl command : curl -v -u admin:admin -XPUT -H"Content-type: text/xml" -d ‘<layer><defaultStyle><name>ZAC_style</name></defaultStyle><enabled>true</enabled></layer>’ http://localhost:8080/geoserver/rest/layers/ZAC It works (ie the layer definition is correctly modified) if i assign it a global style (be it the default ‘population’, or ‘polygon’ again). As soon as i try with a workspace-specific style, the modification is not applied. Dunno if that’s an acl issue, but the ZAC_style style doesnt appear in rest/layers output. My users have access to that style with a GET. #cat security/layers.properties #cat security/rest.properties |
Project: |
|
Priority: |
Major |
Reporter: |