2

I have a new role in GeoServer I called name "Company" moreover some workspaces with different name also, I am going to know how I can associate my workspaces with "Company" role but only through GeoServer REST API not web admin GUI?

1 Answer 1

2

As is usual with the REST API the solution to this is hard to work out from the documentation (which is automatically generated) but relatively easy to work out by studying the responses from the REST API itself, after you have tried the process in the GUI.

Basically you need to POST a new rule to /rest/security/acl/layers - the new rule looks like:

<rules>
  <rule resource="topp.*.r">company</rule>
</rules>

where topp is the workspace you want to associate with the company role. The * applies to all layers or you could specify a named layer there, if you want to allow write access then use w instead of r.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.