Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:adm:assign_roles_to_contract_-_import_of_data_from_csv [2020/08/07 09:07] kubicar [Fill all attributes] |
tutorial:adm:assign_roles_to_contract_-_import_of_data_from_csv [2023/08/02 06:25] 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 | + | 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 8: | Line 8: | ||
< | < | ||
- | Username;Role;Position | + | login;role;eavname1; |
- | kopr;Back Office,Front Office;Business | + | john;role1,role2;eav1; |
- | svanda;Manager;Trip Advisor | + | </ |
+ | |||
+ | 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;role | ||
+ | john;role1,role2 | ||
</ | </ | ||
- | CSV file can have optional number of columns, role and username columns are mandatory. Choose assigning roles to all contracts, main contract or to EAV contract value. If you choose assign contract to EAV attribute, then column with EAV is mandatory. | ||
==== Create new LongRunningTask ==== | ==== Create new LongRunningTask ==== | ||
Line 22: | Line 29: | ||
Now we need to create new LRT with these attributes: | Now we need to create new LRT with these attributes: | ||
- | - Task type - **ImportCSVUserContractRolesTaskExecutor** | + | - 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 - name of the column with username - Roles assignment contract type - Asign roles to one of the options: |
- | - Import | + | |
- | - Column with roles - Name of the column with roles in csv file. | + | * allContracts - assigns roles to all valid and future contracts |
- | - Column with username - name of the column with username | + | |
- | - Roles assignment contract type - Asign roles to one of the options: | + | |
- | * allContracts - assigns roles to all valid and future contracts | + | |
* primeContract - assigns roles to prime/main contract | * primeContract - assigns roles to prime/main contract | ||
* eavContract - assigns roles to contract with specified EAV | * eavContract - assigns roles to contract with specified EAV | ||
- | - Column | + | - Prefix of column name with contract |
- | - Contract eav name - Name of the contract eav in IdM. Mandatory if you choose assign to eavContract. | + | |
- | - Column separator - separator | + | <note important> |
- | - Multi value separator - separator of roles column in csv file. This works ONLY for roles column. You also need to tick the chechbox | + | |
- | - File encoding type - insert encoding of your csv file. Default value is UTF-8 | + | |
- | - Contract definition - specify IdmIdentityContract definition. Use it optionally when you choose assign to eavContract. | + | |
- | {{:tutorial: | + | {{.:assignrolesfromcsv_1.jpg? |
Line 53: | 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 which was in IdM are assigned to contract with eav value same as in CSV. | + | 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 ==== | ==== Known issues ==== |