Page History
...
Similarly, when a form or component is marked invisible, its data should not be sent to the client since it may contain sensitive data.
Protecting properties
Protected Protecting properties (of type protected
)are used to protect an entire component or specific properties or handlers.
When the property is blocking no changes or function calls from the client are accepted.
For example, an the enabled
property as defined below will be true by default, when set to false not changes from the client to the component will be accepted. Also no functions cannot be called from the client.
...
Protection can be done for specific properties or functions.
In this example, when protectCustomer
is set to true
, customerAddress
can still be changed the the client, but customerName
en and removecustomer
are protected.
Code Block | ||||
---|---|---|---|---|
| ||||
"model:" { "customerAddress": "string", "customerName": "string", "protectCustomer": { "type": "protected", "for": "removecustomer, customerName" } }, "handlers:" { "removecustomer": "function" } |
...
Protecting properties themselves can never be modified from the client.
Visibility properties
Visibility properties (of type visible
) are similar to protecting properties. They are protecting the component and also hide the data from the client if the component is not visible.
In this example, a component's model can be filled with a customer name, but when the property visible
is set to false
, the component will be protected and the data will not be sent to the client. When visible
is set to true
, data not sent before will be pushed to the client.
Code Block | ||||
---|---|---|---|---|
| ||||
"model": {
"visible" : "visible",
"customerName": "string"
} |
Visibility properties themselves can never be modified from the client.
Container security
Protecting and visibility properties on containers will protect the container and also components inside the comtainer.
Example
As an example we could have a Tab Panel that has a definition like: (note: this example does not contain the entire Tab Panel spec)
...