Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| a_f:a:protect [2022/09/01 01:23] – removed - external edit (Unknown date) 127.0.0.1 | a_f:a:protect [2023/05/09 01:44] (current) – sean | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{tag> | ||
| + | ====== PROTECT ====== | ||
| + | This action protects a business object or its attribute from access by all or specified users. There are several variations of this action: | ||
| + | |||
| + | ===== Syntax ===== | ||
| + | |||
| + | * [ '' | ||
| + | |||
| + | protects business object or attribute from access by users operating at the specified access level(s) | ||
| + | |||
| + | * '' | ||
| + | |||
| + | protects business object or attribute from all users | ||
| + | |||
| + | * '' | ||
| + | |||
| + | protects business object or attribute from all users except those operating at the specified access level(s) | ||
| + | |||
| + | ===== Example ===== | ||
| + | |||
| + | <code aim>IF Transaction.State=' | ||
| + | PROTECT Transaction FROM ALL </ | ||
| + | <code aim>IF Transaction.State=' | ||
| + | PROTECT Transaction FROM ALL EXCEPT Administrator </ | ||
| + | <code aim>IF Account.State=' | ||
| + | PROTECT Account.Name FROM User </ | ||
| + | |||
| + | If an attribute of a business object is protected it is read-only on forms of this business object. If the entire object is protected all its attributes are read-only. | ||
| + | |||
| + | Notes: | ||
| + | |||
| + | * By default protection applies not only to changes done via the user interface, but also to changes done by a process. It is possible to distinguish between these two situations by specifying System as access level, for example: | ||
| + | |||
| + | <code aim>IF Account.STATE <> ' | ||
| + | PROTECT Account.Balance FROM ALL EXCEPT System | ||
| + | |||
| + | In this case users will not be able to change the account balance when the state of the account is not new, however, it is possible to configure process rules that change the account balance. | ||
| + | |||
| + | * Protecting attributes of referred objects is not allowed, for example the action | ||
| + | <code aim> | ||
| + | * The action can only be used in rules attached to a business object to be protected. The action may not be used in a process. | ||
| + | * '' | ||
| + | * The action specified in the format described above protects against changes to a business object or its attribute (“write protection”). If “read protection” is required, the '' | ||
| + | |||
| + | <code aim>IF Transaction.State=' | ||
| + | READ PROTECT Transaction FROM ALL </ | ||
| + | |||
| + | When a business object is “read protected” the instances that match protection condition will not be read from the system. If an attribute is “read protected” its value will not be visible on any forms and cannot be changed. | ||