Ir al contenido
Otras versiones

Cargando…

Metadata Security element

Esta página aún no está disponible en tu idioma.

The goal of the Security element is to set security for each form element.

The Security element can only be used in combination with other fields:

Available child security elements:

name Description
grantUser Set access to a user.
grantRole Set access to the members of the role.
revokeUser Revoke access to a user.
revokeRole Revoke access to the members of the role.
  • Grant access to a field for a specific user: only testUser is able to access the metadata field named okp:consulting.input1. The defaultAccess property is set to revoke, so no regular user will be able to see this property.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 3.10//EN"
"http://www.openkm.com/dtd/property-groups-3.10.dtd">
<property-groups>
<property-group label="Consulting" name="okg:consulting">
<input label="Input label" name="okp:consulting.input1" defaultAccess="revoke">
<grantUser name="testUser"/>
</input>
<separator label="Separator label" name="okp:consulting.separator" />
<input label="Input label" name="okp:consulting.input2" />
</property-group>
</property-groups>
  • Revoke access to a field for a specific user: the user testUser does not have access to the metadata field named okp:consulting.input1. Other users who have access to the metadata group still have access to it. The defaultAccess property is not present, so the default policy (“grant”) is used. That means that all users will be able to see the property unless there is a child revokeUser tag to exclude users.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 3.10//EN"
"http://www.openkm.com/dtd/property-groups-3.10.dtd">
<property-groups>
<property-group label="Consulting" name="okg:consulting">
<input label="Input label" name="okp:consulting.input1">
<revokeUser name="testUser"/>
</input>
<separator label="Separator label" name="okp:consulting.separator" />
<input label="Input label" name="okp:consulting.input2" />
</property-group>
</property-groups>