Asset Publisher

Layer-level operations and permissions


 

Layer-level operations and permissions

CartoDruid allows you to parameterize a limited set of options about layers and TOC (Table of Contents). To be able to use the full power of the tool, you have to resort to manual settings.

Specifically, Cartodruid allows you to configure in each project the operations that the user can do on the geometries of a layer or restrict the actions to be performed on TOC.

Index

General structure of the file

For each project that you have configured in CartoDruid, there will be a crtdrdLayer. <project_id> .xml file in the cartodroid / config / folder. This file stores the reference to the layers that are displayed in the project and their behavior (display, permissions, operations, etc.).

Configuration of actions at TOC level

It is applicable to all types of layers, and with this we limit the possibilities of modification that the user has on the TOC of the project: position of the layers, operations, etc. You can consult the complete list of permissions and operations at the vectorial layer level in point 5.2 Vectorial Layer Configuration of the CartoDruid Reference Manual.

layerRemovable:

For example, if we want to prevent a user from removing a layer from the TOC, we will use the layerRemovable property.

This configuration is set in the crtdrdLayer.<project_id>.xml file under the es.jcyl.ita.crtcyl.core.model.VectorialLayer element.

In the XML we would have something like this:

<es.jcyl.ita.crtcyl.core.config.WKSLayerConfiguration>

  <layers class="java.util.LinkedHashMap">

    <!-- polygons layer settings -->

      <entry>

         <string>poligonos</strin g>

         <es.jcyl.ita.crtcyl.core.model.VectorialLayer>

           ...

           <id>poligonos</id>

           <identifiable>true</identifiable>

           <inspeccionable>true</inspeccionable>

           <labelExpression></labelExpression>

           <layerEditable>true</layerEditable>

                  <layerRemovable>true</layerRemovable>

           <name>poligonos</name>

           <searchable>true</searchable>

           ...

          </es.jcyl.ita.crtcyl.core.model.VectorialLayer>

       </entry>

       ...

  </layers>

</es.jcyl.ita.crtcyl.core.config.WKSLayerConfiguration>

Con layerRemovable=True:
Con layerRemovable=False:

 

Configuration of permissions and operation at the vectorial layer level

In the case of vectorial layers, we can limit the specific operations that the user can do on the layer's Features. You can consult the complete list of permissions and operations at the vectorial layer level in point 5.2 Vectorial layer configuration of the CartoDruid Reference Manual.

editable:

For example, if we want to prevent a user from modifying the entities of a layer (both the geometry and the attributes), we can use the editable parameter.

This configuration is set in the crtdrdLayer.<project_id>.xml file under the es.jcyl.ita.crtcyl.core.model.VectorialLayer element.

In the XML we would have something like this:

<es.jcyl.ita.crtcyl.core.config.WKSLayerConfiguration>

  <layers class="java.util.LinkedHashMap">

    <!-- polygons layer settings -->

      <entry>

         <string>poligonos</strin g>

         <es.jcyl.ita.crtcyl.core.model.VectorialLayer>

           ...

           <deletable>true</deletable>

           <descripcion></descripcion>

           <editAfterCreation>true</editAfterCreation>

       <editable>true</editable>

           <exportable>true</exportable>

           <id>poligonos</id>

           <identifiable>true</identifiable>

           <inspeccionable>true</inspeccionable>

           <labelExpression></labelExpression>

           ...

          </es.jcyl.ita.crtcyl.core.model.VectorialLayer>

       </entry>

       ...

  </layers>

</es.jcyl.ita.crtcyl.core.config.WKSLayerConfiguration>

If its value is true, making a long click on a geometry, it can be edited for possible modification.

If its value is false, making a long click on the geometry, the information can be consulted, but it cannot be modified.

 

These are some of the permissions and operations that can be configured. The complete list of permissions and operations at the vector layer level can be found in point 5.2 Vectorial Layer Configuration of the CartoDruid Reference Manual.