Defect #2980
closedCan't edit already assigned role with unique role attribute
100%
Description
Tested on 11.1.1. Previous versions had similar issue #2842.
The role has a required unique attribute.
We change the validity of the assigned role (we don't change anything else):
The role request fails with the following exception:
2021-10-14T13:14:08.407474+02:00[Europe/Prague]: Identity-role [7a7448d5-5be4-4981-a11d-ee7d478ceed0] (for role [PRISTUP]) has unvalid attribute [idCardNumber]!
Files
Related issues
Updated by Radek Tomiška about 3 years ago
- Assignee changed from Radek Tomiška to Vít Švanda
Updated by Vít Švanda about 3 years ago
- Target version set to 12.0.0
- % Done changed from 40 to 90
Fixed. The problem was in a situation where the request was performing a validation of the uniqueness of the value at the identity-role and at the same time against the same value in the request concept. The fact that the uniqueness validation is done in both "stacks" is useful at the time of creating a new concept (here we need to know that the value is already used at some identity-role). For this reason, I created a new parameter (validateOnlySameOwnerType) in the attributes validation that allows to enable the check only for the same entity type.
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/245a5d758eb2f59355f0f12142592babaeecc73e
Updated by Radek Tomiška about 3 years ago
- Related to Defect #2842: Audit displays misleading warning for a unique role attribute, can't edit already assigned role added
Updated by Vít Švanda about 3 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
Updated by Radek Tomiška about 3 years ago
- Target version changed from 12.0.0 to 11.2.2
Updated by Radek Tomiška about 3 years ago
- Status changed from Needs feedback to Closed
- Assignee changed from Radek Tomiška to Vít Švanda
- % Done changed from 90 to 100
I did test and code rewiew, it works, thx!