Automatic group member assignment
The task "00000000-0000-0000-0000-000000000004" is a system task and is executed in a fixed interval in order to update memberships of user objects in groups. The task searches for groups which have member assignment via code configured. This is done by setting the attribute didmosGroupAssignmentTargetCode for a group. If the task evaluates this attribute and computes missing members, it will add them to the group.
Structure of didmosGroupAssignmentTargetCode
The attribute contains a string representation of python code which computes a list of dns that should be member of this group To do so, some defined local variables can be accessed inside the code section. After finishing the process of computing dns, the result has to be stored as a list inside the defined local variable "result".
Defined local variables
- util: Equivalent of "from general import util" and grants access to all methods from general.util.
- search_handler: Instantiated class object of ldap_app.connection_layer.connection_handler.SearchHandler
- configuration: Didmos2core configuration object with access to all configuration parameters via .get_value()
- connection: Connection object to access database
- result: Computation result object. The result of any computation done in the code section has to be stored to this attribute as list.