Project

General

Profile

Actions

Defect #3046

closed

Remove last rule for automatic roles break referential integrity

Added by Ondřej Kopr over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Tomáš Doischer
Category:
Automatic roles
Target version:
Start date:
01/31/2022
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

Use case:
  • Administrator removes last rule by editing automatic roles by attribute,
  • the automatic role itself still exists but without rules,
  • the recalcutaion porcess ends with error result:
    java.lang.IllegalArgumentException: Pageable must not be null!
        at org.springframework.util.Assert.notNull(Assert.java:198)
        at org.springframework.data.domain.Chunk.<init>(Chunk.java:54)
        at org.springframework.data.domain.PageImpl.<init>(PageImpl.java:46)
        at eu.bcvsolutions.idm.core.model.service.impl.DefaultIdmAutomaticRoleAttributeService.getContractsForAutomaticRole(DefaultIdmAutomaticRoleAttributeService.java:336)
    

There is little diference between LTS version and 11.x because on LTS version process still removes all roles from user and only recalculation ended with error. But in version 11 (customer environment) ends the task with broken referential integrity. And we must fixed the issue with database queries.

When we create automatic roles is required at least one rule, so solution is probably very easy - just disallows remove last rule from whole automatic role.

Actions

Also available in: Atom PDF