Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial:adm:assign_roles_to_contract_-_import_of_data_from_csv [2020/08/11 11:32]
doischert
tutorial:adm:assign_roles_to_contract_-_import_of_data_from_csv [2021/05/11 17:03]
sourek [Fill all attributes]
Line 8: Line 8:
  
 <code> <code>
-login;role;eavname1;eavvalue1;eavname2;eavvalue2 +login;role;eavname1;eavvalue1;eavname2;eavvalue2;roleattributename1;roleattributevalue1 
-john;role1,role2;eav1;123;eav2;321+john;role1,role2;eav1;123;eav2;321,roleAttribute,attributeValue
 </code> </code>
  
-As a result, this task will assign roles with the code 'role1' and 'role2' to a user with username 'john' on a contract which has the value of a contract EAV 'eav1' '123' and 'eav2' '321', if such contract exists.+As a result, this task will assign roles with the code 'role1' and 'role2' to a user with username 'john' on a contract which has the value of a contract EAV 'eav1' '123' and 'eav2' '321', if such contract exists. It will also set role attribute "roleAttribute" to value "attributeValue". Note that if no such parameter exists, import task will simply skip this and it wont fail.
  
 If you want to assign roles to the main contract or to all contracts, you only need to specify the username and the roles. If you want to assign roles to the main contract or to all contracts, you only need to specify the username and the roles.
Line 40: Line 40:
   * eavContract - assigns roles to contract with specified EAV   * eavContract - assigns roles to contract with specified EAV
 - Prefix of column name with contract attribute name - Prefix of column with contract eav code in the csv file. You can use any number of EAV attributes you choose, only make sure to add numbers after the prefix starting with 1. Mandatory if you choose assign to eavContract. (See the first example of a CSV file above.) - Prefix of column name with contract attribute name - Prefix of column with contract eav code in the csv file. You can use any number of EAV attributes you choose, only make sure to add numbers after the prefix starting with 1. Mandatory if you choose assign to eavContract. (See the first example of a CSV file above.)
-- Prefix of column name with contract attribute value - Prefix of column with contract eav value in the csv file. You can use any number of EAV attributes you choose, only make sure to add numbers after the prefix starting with 1. Mandatory if you choose assign to eavContract. (See the first example of a CSV file above.) +- Prefix of column name with contract attribute value - Prefix of column with contract eav value in the csv file. You can use any number of EAV attributes you choose, only make sure to add numbers after the prefix starting with 1. Mandatory if you choose to assign to eavContract. (See the first example of a CSV file above.) 
-- Multi value separator - separator of roles column in csv file. This works ONLY for roles column. You also need to tick the checkbox. +- Multi value separator - separator of roles column in csv file. This works ONLY for the roles column. You also need to tick the checkbox. 
-- Contract definition - specify IdmIdentityContract definition code. Use it optionally when you choose assign to eavContract. Default value is default.+- Contract definition - specify IdmIdentityContract definition code. Use it optionally when you choose to assign to eavContract. The default value is default. 
 +- Prefix of column with the name of the role parameter.  
 +- Prefix of column with the value of the role parameter. 
 + 
 +<note important>There is a known issue with importing unique role attributes. If the attribute is defined as unique, you need to have unique values for the attribute in your input csv file. If values are not unique, there is a possibility to create non unique values in IdM due to the asynchronous nature of role requests.</note>
  
 {{ :tutorial:adm:assignrolesfromcsv.jpg?nolink&600 |}} {{ :tutorial:adm:assignrolesfromcsv.jpg?nolink&600 |}}
  • by cabelkal