Differences

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

Link to this comparison view

Both sides previous revision Previous revision
tutorial:adm:automatic-roles-structure-and-attribute [2019/08/28 14:05]
klementm
tutorial:adm:automatic-roles-structure-and-attribute [2021/11/05 11:48] (current)
sourek
Line 7: Line 7:
 idm.sec.extras.processor.contract-position-set-eav-processor.enabled=true idm.sec.extras.processor.contract-position-set-eav-processor.enabled=true
 idm.sec.extras.processor.identity-contract-set-eavs-processor.enabled=true idm.sec.extras.processor.identity-contract-set-eavs-processor.enabled=true
-idm.sec.extras.processor.tree-node-update-eav-trees-processor.enabled=true</code></note>+idm.sec.extras.processor.tree-node-update-eav-trees-processor.enabled=true 
 + 
 +</code> 
 + 
 +</note>
  
 As we need to set some automatic roles by its place in the structure we will create two new form properties. In these properties will be held names of nodes where the contract is positioned or for the second property what are his parents. Follow this tutorial to set this feature up. As we need to set some automatic roles by its place in the structure we will create two new form properties. In these properties will be held names of nodes where the contract is positioned or for the second property what are his parents. Follow this tutorial to set this feature up.
Line 19: Line 23:
 Make sure that you have enabled Extras module. This feature is part of that module. Make sure that you have enabled Extras module. This feature is part of that module.
  
-{{ :tutorial:adm:abd01.png?600 |}} +{{  .:abd01.png?600  }}
  
 ==== 2) Configuration of names ==== ==== 2) Configuration of names ====
  
-Now we need to move to **Settings** -> **Configuration** and there are these properties. Provide name by your choice. In the example below you can see these properties:+Now we need to move to **Settings** → **Configuration** and there are these properties. Provide name by your choice. In the example below you can see these properties:
  
-{{ :tutorial:adm:abc02.png?600 |}}+{{  .:abc02.png?600  }}
  
 **module.extras.processor.set-node-to-eav** - to this property we write all nodes where contract is positioned **module.extras.processor.set-node-to-eav** - to this property we write all nodes where contract is positioned
Line 36: Line 39:
 ===== 3) Set automatic role ===== ===== 3) Set automatic role =====
  
-Now we need to set an automatic role. Move to Roles -> Automatic roles -> Based on the attribute. Now follow the pictures.+Now we need to set an automatic role. Move to Roles → Automatic roles → Based on the attribute. Now follow the pictures.
  
   * Add new automatic role   * Add new automatic role
-{{ :tutorial:adm:abc03.png?600 |}}+ 
 +{{  .:abc03.png?600  }}
  
   * Choose the role   * Choose the role
-{{ :tutorial:adm:abc04.png?600 |}}+ 
 +{{  .:abc04.png?600  }}
  
   * Fill the name   * Fill the name
-{{ :tutorial:adm:abc05.png?600 |}}+ 
 +{{  .:abc05.png?600  }}
  
   * Add rule   * Add rule
-{{ :tutorial:adm:abc06.png?600 |}}+ 
 +{{  .:abc06.png?600  }}
  
   * Fill information - you can see that you need extended attribute of the contract. Then select your attribute name set in step 2. How equals is working? It is true if in this attribute is your name of the node.   * Fill information - you can see that you need extended attribute of the contract. Then select your attribute name set in step 2. How equals is working? It is true if in this attribute is your name of the node.
-{{ :tutorial:adm:abc07.png?600 |}}+ 
 +{{  .:abc07.png?600  }}
  
   * Now we have approved the rule and all is set up!   * Now we have approved the rule and all is set up!
-{{ :tutorial:adm:abc08.png?600 |}}+ 
 +{{  .:abc08.png?600  }} 
 + 
 +===== Turning off automatic role recalculation ===== 
 + 
 +In some cases it might be beneficial to disable automatic role recalculation for IdmIdentityContractDto entity events created by changing TreeNodes parent (see AbstractSaveContractsExecutor). This can be done by setting the configuration property 
 + 
 +<code>idm.sec.extras.save-treenodes.skip-recalculation=true 
 + 
 +</code> 
 + 
 +Note that in order for this to work properly, you need to schedule ProcessAllAutomaticRoleByAttributeTaskExecutor after tree node sync which will ensure that automatic roles will be recalculated. Also, keep in mind that this won't work for manual tree node parent change or any other change of tree nodes parent for that matter. For this reason, it is recommended to use this only in environments, where tree node structure is synchronized and is never manually altered.
  
  
  • by klementm