Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
tutorial:adm:assign_roles_to_contract_-_import_of_data_from_csv [2019/06/11 12:31] hanakp created |
tutorial:adm:assign_roles_to_contract_-_import_of_data_from_csv [2023/08/02 05:54] cabelkal [Fill all attributes] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Assign roles to contract EAV - Import of data from CSV ====== | ====== Assign roles to contract EAV - Import of data from CSV ====== | ||
+ | |||
+ | This task assigns roles to contracts. You can either assign roles to every contract of the user, to the main contract, or to a contract specified by contract EAV values. | ||
==== Prepare CSV file ==== | ==== Prepare CSV file ==== | ||
Line 6: | Line 8: | ||
< | < | ||
- | Username;Role;Position | + | login;role;eavname1;eavvalue1;eavname2; |
- | kopr;Back Office;Business | + | john; |
- | svanda;Manager;Trip Advisor | + | |
</ | </ | ||
- | CSV file can have optional number | + | As a result, this task will assign roles with the code ' |
+ | |||
+ | If you want to assign roles to the main contract or to all contracts, you only need to specify the username and the roles. | ||
+ | |||
+ | < | ||
+ | login; | ||
+ | john; | ||
+ | </ | ||
==== Create new LongRunningTask ==== | ==== Create new LongRunningTask ==== | ||
Line 21: | Line 29: | ||
Now we need to create new LRT with these attributes: | Now we need to create new LRT with these attributes: | ||
- | - Task type - **ImportCSVUserContractRolesTask** | + | - Task type - **Import assigned roles** - Column separator - separator of columns in csv file - File encoding type - insert encoding of your csv file. Default value is UTF-8 - Upload CSV file - dropzone to select or drop csv file - Column with roles - Name of the column with roles in csv file. - Column with username |
- | - Import | + | |
- | - Column with username | + | * allContracts |
- | - Column with roles - Name of the column with roles in csv file | + | * primeContract - assigns roles to prime/main contract |
- | - Column | + | * eavContract - assigns roles to contract with specified EAV |
- | - Contract eav name - Name of the contract eav in IdM | + | |
- | - Column | + | - Prefix of column name with contract |
+ | |||
+ | <note important> | ||
+ | |||
+ | {{ .: | ||
- | {{: | ||
==== Run the task ==== | ==== Run the task ==== | ||
Line 43: | Line 54: | ||
You can check status about created role definitions in "all tasks" panel in task detail. Here you can find information about created or already existing automatic role definitions. | You can check status about created role definitions in "all tasks" panel in task detail. Here you can find information about created or already existing automatic role definitions. | ||
- | Everything should be set up so far and when the task ends, roles are imported | + | Everything should be set up and when the task ends, roles which was in IdM are assigned to contract with eav value same as in CSV. |
+ | |||
+ | ==== Known issues ==== | ||
+ | |||
+ | If you delete or upload new file via dropzone, you should delete old files, created from previous uploads. |