Project

General

Profile

Actions

Defect #1263

closed

Automatic role by attribute "workPosition" doesn't work

Added by Alena Peterová over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Automatic roles
Target version:
Start date:
09/21/2018
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

Version: current develop (9.1.1.-SNAPSHOT)
Automatic role for contract attribute "workPosition" doesn't work - the role isn't assigned to users. The LRT, which should add the role, fails with the following exception:

java.lang.ClassCastException: Cannot cast java.lang.String to eu.bcvsolutions.idm.core.model.entity.IdmTreeNode
    at java.lang.Class.cast(Class.java:3369)
    at eu.bcvsolutions.idm.core.model.service.impl.DefaultIdmAutomaticRoleAttributeService.castToType(DefaultIdmAutomaticRoleAttributeService.java:708)
    at eu.bcvsolutions.idm.core.model.service.impl.DefaultIdmAutomaticRoleAttributeService.getPredicateForRuleByContract(DefaultIdmAutomaticRoleAttributeService.java:502)

Use-case:
We want to assign the role automatically by organization and at the same time an EAV of identity. So we need one of the automatic rules: contract.workPosition = 123456 where 123456 is the code of the organization.
So far we can use workaround - set the code of the organization to a new EAV of contract.


Related issues

Related to IdStory Identity Manager - Feature #1265: Support automatic roles by organization and by attributesNewOndřej Kopr09/24/2018

Actions
Actions #1

Updated by Radek Tomiška about 6 years ago

  • Assignee changed from Ondřej Kopr to Radek Tomiška

Automatic role by attribute "workPosition" is not implemented. Automatic roles by tree nodes can be used for this purpose.

I'll remove unimplemented field "workPosition" from automatic roles by attribute (the same as ''guarantees'' in #1145) for now. Then we can discuss about, if it is needed to implement it (UC above cannot be solved by automatic roles by tree nodes it self)

Actions #2

Updated by Alena Peterová about 6 years ago

Radek Tomiška wrote:

Automatic role by attribute "workPosition" is not implemented. Automatic roles by tree nodes can be used for this purpose.

I'll remove unimplemented field "workPosition" from automatic roles by attribute (the same as ''guarantees'' in #1145)

OK, please remove it for now. I will create a new ticket - feature request - for our use case (combination of automatic roles by organization and by attribute - we need it on 2 projects already).

Actions #3

Updated by Alena Peterová about 6 years ago

  • Related to Feature #1265: Support automatic roles by organization and by attributes added
Actions #4

Updated by Radek Tomiška about 6 years ago

  • Status changed from New to Needs feedback
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • Target version set to Morganite (9.2.0)
  • % Done changed from 0 to 90

I removed field "workPosition" from automatic roles by attribute.

Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/f2acbd331880f0ffd143094f086446a48af19382

Could you do a feedback, pls?

Actions #5

Updated by Ondřej Kopr about 6 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 90 to 100

Thank you for remove workPosition, now isn't possible pick this attribute by frontend.

Actions #6

Updated by Radek Tomiška about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF