Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tutorial:adm:roles_-_import_data_from_csv [2019/06/12 14:15] – hanakp | tutorial:adm:roles_-_import_data_from_csv [2026/03/13 10:28] (current) – cem | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Roles - Import of data from CSV ====== | ====== Roles - Import of data from CSV ====== | ||
| - | ===== 1a. Prepare | + | ==== 1. Prepare |
| - | Please | + | Here is an example of a CSV file which can be used for importing (or updating) roles, setting their role attributes, guarantees (by user, or by role) and criticality, |
| - | ==== 1b. Prepare CSV file ==== | + | < |
| + | roles; | ||
| + | testimportrolename; | ||
| - | Here is an example of CSV file which can be used for import roles. | ||
| - | |||
| - | < | ||
| - | roles; | ||
| - | Manager; | ||
| - | " | ||
| - | PAY-OP | ||
| - | PAY-SP | ||
| - | PAY-BLL | ||
| - | AMT-BLK | ||
| - | ACC-CLOSE"; | ||
| </ | </ | ||
| - | As you can see roles column can be single or multivalued. For multivalued roles, | + | In Excel, it looks like this: {{ .: |
| - | CSV file can have optional number of columns, role and description columns | + | |
| + | As you can see roles column can contain | ||
| + | |||
| + | The result of this LRT used with this CSV file should be that one new role testimportrolename (with code testimportrolecode) will be created. It will have these properties: | ||
| + | |||
| + | * description: | ||
| + | * attribute: ' | ||
| + | * guarantee: user with username ' | ||
| + | * guarantee by role: role with the code ' | ||
| + | * criticality: | ||
| + | * catalogue: it will be in ' | ||
| + | * it will have EAV with code ' | ||
| + | * it will create an account on system ' | ||
| + | |||
| + | <note important> | ||
| ==== Create new LongRunningTask ==== | ==== Create new LongRunningTask ==== | ||
| - | Now we will create the new LongRunningTask(LRT). As shown in the picture, go to Settings → Task scheduler → Scheduled tasks and hit green " | + | Now we will create the new LongRunningTask (LRT). As shown in the picture, go to Settings → Task scheduler → Scheduled tasks and hit green " |
| + | |||
| + | {{ .: | ||
| ==== Fill all attributes ==== | ==== Fill all attributes ==== | ||
| Line 31: | Line 38: | ||
| Now we need to create new LRT with these attributes: | Now we need to create new LRT with these attributes: | ||
| - | - Task type - **ImportRolesFromCSVExecutor** | + | **General:** |
| - | - Import csv file - dropzone to select or drop csv file | + | |
| - | - Column with roles - Name of the column with roles in csv file | + | * Upload a CSV file - dropzone to select or drop csv file |
| - | - Column with description - name of the column with role description, | + | |
| - | - Column separator - separator of columns in csv file | + | * Column with role codes - name of the column with role codes in csv file; if left empty, the role code is based on the role name, only spaces are replaced by underscores |
| - | - Multi value separator - ( Char, default: | + | * Column with description - name of the column with role description, |
| - | - System | + | * Column with criticality |
| - | - MemberOf attribute | + | * Column with catalogue names - name of the column with catalogue names, can be also used to update catalogue names (if your CSV file doesn' |
| - | - Can be requested | + | * Column with subrole codes - name of the column with subordinate roles codes, can be also used to update subordinate roles (if your CSV file doesn' |
| + | * Column separator - separator of columns in csv file (default ; ) | ||
| + | | ||
| + | * Role environment | ||
| + | * Can be requested - (Boolean) - Roles can be requested, can be also used to update already imported settings; it allows not selecting value when updating (not when creating!) roles which will not change the Can be requested property of roles. When creating roles, either Yes or No must be selected. | ||
| + | * Skip assignments of sub-roles - If checked, sub-roles won't be assigned to users with assigned parent role (useful for sub-role assignment under roles which aren't assigned to user, available from version 14.6.0) | ||
| + | |||
| + | **Role attributes: | ||
| + | |||
| + | * Column with role attributes | ||
| + | * Form definition code - the code for the definition which will contain the added attributes (you only have to fill this if you are setting attributes) | ||
| + | |||
| + | **Role EAVs:** | ||
| + | |||
| + | You can set value to multiple role EAVs. The mechanism used for this is prefixes which are followed by the order number of the column (e. g., ' | ||
| + | |||
| + | * Prefix of column with name of EAV attribute: Only attributes from the main role definition can be imported and they must of type SHORTTEXT. Supports update (the current value of the attribute will be overwritten if imported). | ||
| + | * Prefix of column with value of EAV attribute | ||
| + | |||
| + | **Guarantees: | ||
| + | |||
| + | * Column with guarantee | ||
| + | * Column with guarantee types - name of the column with role guarantee by identity [[.:new_role|type]] (if your CSV file doesn' | ||
| + | * Update guarantee types - check if you want to add new guarantee type to an existing guarantee (this will create a new guarantee with the selected type, the original one will still exist) (since Extras 2.2.0) | ||
| + | * Column with guarantee role - name of the column with role guarantee by role code, can be also used to update role guarantee (if your CSV file doesn' | ||
| + | * Column with guarantee role types - name of the column with role guarantee by role [[.: | ||
| + | * Update guarantee role types - check if you want to add new guarantee type to an existing guarantee role (this will create a new guarantee with the selected type, the original one will still exist) (since Extras 2.2.0) | ||
| + | |||
| + | **System: | ||
| + | |||
| + | You can set attributes at multiple systems or set multiple attributes in one system. The mechanism used for this is prefixes which are followed by the order number of the column (e. g., ' | ||
| + | |||
| + | * Prefix of column with system name | ||
| + | * Prefix of column with system | ||
| + | * Prefix of column with system attribute values: The attribute has to a multivalued attribute with merge strategy set. It should not contain | ||
| + | |||
| + | Since module version **14.1.0** **15.1.0**, you can configure columns for parameters that specify the selection of mapping for linking a role to a system. All of these parameters are optional: | ||
| + | |||
| + | * prefix of column with flag whether the role creates an account | ||
| + | * prefix of column with entity type: If not set, IDENTITY is used by default. Possible values are IDENTITY | ||
| + | * prefix | ||
| + | |||
| + | The entity type and account type act as filters for available mappings. The system selects the first mapping returned by the filter (if multiple mappings match, one is selected essentially at random). The flag for account creation then defines the specific behavior for that link; in previous versions, the default behavior was always used, where the role automatically creates an account on the system. | ||
| + | |||
| + | For example, consider the following import file: | ||
| + | < | ||
| + | |||
| + | name; | ||
| + | My role;my-role;Some system; | ||
| + | |||
| + | </ | ||
| + | |||
| + | Set the folowing: | ||
| + | |||
| + | * Prefix of column with system name: system | ||
| + | * Prefix of column with the setting of whether the role automatically creates an account on the system: roleCreatesAccount | ||
| + | * Prefix of column with account type: accountType | ||
| + | * Prefix of column with entity type: entityType | ||
| + | |||
| + | Then, the import | ||
| + | |||
| + | | ||
| + | - will connect the role with system Some system via provisioning mapping of personal accounts and role assignment will create account on system | ||
| + | - will connect the role with system Other system via provisioning mapping of other personal accounts and role assignment won't create account on system | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | < | ||
| + | |||
| + | {{ .: | ||
| - | {{: | ||
| ==== Run the task ==== | ==== Run the task ==== | ||
| - | Now we just need to hit run. | + | Now we need to hit run. |
| - | {{: | + | {{.: |
| - | And we also need to process it in all tasks. | + | Now we must go to the "all tasks" panel, select the newly created LRT (check the checkbox), click Operation with selected record and Run selected task. |
| - | {{:tutorial: | + | {{ .:05_start.png?direct& |
| - | You can check status | + | You can also check the status |
| - | Everything | + | At this point, everything |
| + | |||
| + | {{ .: | ||
| ==== Known issues ==== | ==== Known issues ==== | ||
| If you delete or upload new file via dropzone, you should delete old files, created from previous uploads. | If you delete or upload new file via dropzone, you should delete old files, created from previous uploads. | ||
| + | |||