Project

General

Profile

Defect #1263

Automatic role by attribute "workPosition" doesn't work

Added by Alena Peterová 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Category:
Automatic roles
Target version:
Start date:
09/21/2018
Due date:
% Done:

100%


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 CzechIdM - Feature #1265: Support automatic roles by organization and by attributes New 09/24/2018

History

#1 Updated by Radek Tomiška 10 months 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)

#2 Updated by Alena Peterová 10 months 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).

#3 Updated by Alena Peterová 10 months ago

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

#4 Updated by Radek Tomiška 10 months 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?

#5 Updated by Ondřej Kopr 10 months 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.

#6 Updated by Radek Tomiška 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF