Project

General

Profile

Actions

Defect #3392

closed

Account protection doesn't work

Added by Ondřej Kopr 11 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Peter Štrunc
Category:
Provisioning
Target version:
Start date:
06/13/2023
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:
Peter Štrunc

Description

After project upgraded to version 13.0.x can exist more mapping for provisioning and same entity type.

This behavior brokes account protection because one of mapping can setup account protection, but after account delete isn't setup protection because in method missing check specific mapping:

DefaultSysSystemMappingService#getProtectionInterval

    @Override
    public Integer getProtectionInterval(AccAccountDto account) {
        Assert.notNull(account, "Account cannot be null!");
        Assert.notNull(account.getEntityType(), "EntityType cannot be null!");

        SysSystemDto system = DtoUtils.getEmbedded(account, AccAccount_.system);
        List<SysSystemMappingDto> mappings = this.findBySystem(system, SystemOperationType.PROVISIONING,
                account.getEntityType());
        if (mappings.isEmpty()) {
            return -1;
        }
        // We assume only one mapping for provisioning and entity type.
        return this.getProtectionInterval(mappings.get(0));
    }

This is probably problem:

return this.getProtectionInterval(mappings.get(0));

Actions

Also available in: Atom PDF