Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
a_f:a:protect [2022/09/01 02:53] administratora_f:a:protect [2023/05/09 01:44] (current) sean
Line 1: Line 1:
-{{tag>Actions Action_List Business_Object Business_Rules Attribute}} +{{tag>Index Action Action_List Business_Object Business_Rule Attribute}} 
 ====== PROTECT ====== ====== PROTECT ======
  
Line 20: Line 20:
 ===== Example ===== ===== Example =====
  
-<code aim> IF Transaction.State='APPLIED' THEN +<code aim>IF Transaction.State='APPLIED' THEN 
   PROTECT Transaction FROM ALL </code> do not allow any changes to a transaction if it is in the Applied state   PROTECT Transaction FROM ALL </code> do not allow any changes to a transaction if it is in the Applied state
-<code aim> IF Transaction.State='APPLIED' THEN +<code aim>IF Transaction.State='APPLIED' THEN 
   PROTECT Transaction FROM ALL EXCEPT Administrator </code>   PROTECT Transaction FROM ALL EXCEPT Administrator </code>
-<code aim> IF Account.State='CLOSED' THEN +<code aim>IF Account.State='CLOSED' THEN 
   PROTECT Account.Name FROM User </code>   PROTECT Account.Name FROM User </code>
  
Line 33: Line 33:
   * 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:   * 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 <> 'NEW' THEN +<code aim>IF Account.STATE <> 'NEW' THEN 
   PROTECT Account.Balance FROM ALL EXCEPT System  </code>   PROTECT Account.Balance FROM ALL EXCEPT System  </code>
  
Line 39: Line 39:
  
   * Protecting attributes of referred objects is not allowed, for example the action    * Protecting attributes of referred objects is not allowed, for example the action 
-<code aim> PROTECT Transaction.Account.State FROM ALL </code> is invalid.+<code aim>PROTECT Transaction.Account.State FROM ALL </code> is invalid.
   * 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 can only be used in rules attached to a business object to be protected. The action may not be used in a process.
   * ''IN FORMS'' key may be specified to indicate that the action only applies in forms, but not in queries (this can speed up performance of queries on the object that owns the rules   * ''IN FORMS'' key may be specified to indicate that the action only applies in forms, but not in queries (this can speed up performance of queries on the object that owns the rules
   * 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 ''READ'' prefix should be added in front of the action. For example,   * 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 ''READ'' prefix should be added in front of the action. For example,
  
-<code aim> IF Transaction.State='APPLIED' THEN +<code aim>IF Transaction.State='APPLIED' THEN 
   READ PROTECT Transaction FROM ALL </code>   READ PROTECT Transaction FROM ALL </code>
  
 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. 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.
  • Last modified: 2022/09/13 18:11