_auth
The authorizations for changing data point attributes are managed with the "_auth" config. See also chapter _auth (Authorization).
Attribute (neutral) | Type | Description |
---|---|---|
_type | char | Creates a config or you can delete a config by executing a dpSet with the value 0 on the _type attribute. |
_read | int | With the attribute _read the current user can view a config. See also chapter _auth (Authorization). |
_write | int | With the attribute _write the current user can change a config - see the example below. See also chapter _auth (Authorization). |
_owner_read | int | With the attribute _owner_read a manager can view a config. See also chapter _auth (Authorization). |
_owner_write | int | With the attribute _owner_write a manager can change a config. See also chapter _auth (Authorization). |
Constants for the ".._type" attribute
CTRL constant | int value | Description |
---|---|---|
DPCONFIG_NONE | 0 | No authorization |
DPCONFIG_AUTH | 62 | Authorization |
Example
Adds an "_auth" config to the data point "TestDP_1". The _auth config specifies that the
authorization level 5 is required for changing the "_original" config :
main()
{
dpSetWait("TestDP_1.element:_auth.._type",
DPCONFIG_AUTH,
"TestDP_1.element:_auth._original._write",5);
}
For more information on "_auth" config, see chapter _auth (Authorization).