Project

General

Profile

Actions

Task #452

closed

Groovy sandbox - bloating of authorities

Added by Filip Měšťánek almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Scripts
Target version:
Start date:
05/30/2017
Due date:
% Done:

100%

Estimated time:
Owner:

Description

I have a simple script which find the main contract of a user. But the script requires tons of authorities (see the image), which I don't even explicitly use. Some of them are some internal classes (possibly used by Spring?) like proxies.

import eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto;

List<IdmIdentityContractDto> contracts = identityContractService.findAllByIdentity(identityId);

for (IdmIdentityContractDto contract : contracts) {
    if (contract.isMain()) {
        return contract;
    }
}
return null;

The other issue is, that it looks like the scripts are influencing other scripts. Because sometimes I am require to add an authority, which isn't clearly used in the script. My theory is, that if script A uses class B and calls script C, the script C needs to also include the class B in the authority (or possibly the other way). Try it with using System.out.println in the script A.\

And a small side note, the class/service labels aren't translated.


Files

skript1.png (72.4 KB) skript1.png Jan Helbich, 06/09/2017 08:03 AM
skript2.png (282 KB) skript2.png Jan Helbich, 06/09/2017 08:03 AM

Related issues

Related to IdStory Identity Manager - Task #461: Script exceptions - show script codeClosedOndřej Kopr05/30/2017

Actions
Actions

Also available in: Atom PDF