use of eu.bcvsolutions.idm.acc.dto.SysSyncRoleConfigDto in project CzechIdMng by bcvsolutions.
the class RoleWorkflowAdSyncTest method n5_testSyncWithWfSituationMissingEntity.
@Test
public void n5_testSyncWithWfSituationMissingEntity() {
SysSystemDto system = initData();
IdmRoleFilter roleFilter = new IdmRoleFilter();
roleFilter.setText(ROLE_NAME);
List<IdmRoleDto> roles = roleService.find(roleFilter, null).getContent();
Assert.assertEquals(0, roles.size());
Assert.assertNotNull(system);
SysSyncRoleConfigDto config = doCreateSyncConfig(system);
config.setLinkedActionWfKey(wfExampleKey);
config.setMissingAccountActionWfKey(wfExampleKey);
config.setMissingEntityActionWfKey(wfExampleKey);
config.setUnlinkedActionWfKey(wfExampleKey);
config = (SysSyncRoleConfigDto) syncConfigService.save(config);
// Start sync
helper.startSynchronization(config);
SysSyncLogDto log = checkSyncLog(config, SynchronizationActionType.MISSING_ENTITY, 1, OperationResultType.WF);
Assert.assertFalse(log.isRunning());
Assert.assertFalse(log.isContainsError());
roles = roleService.find(roleFilter, null).getContent();
Assert.assertEquals(1, roles.size());
IdmRoleDto role = roles.get(0);
List<IdmFormValueDto> dnValues = formService.getValues(role, ATTRIBUTE_DN);
Assert.assertEquals(1, dnValues.size());
Assert.assertEquals(ATTRIBUTE_DN_VALUE, dnValues.get(0).getValue());
IdmRoleCatalogueDto catalogueFirst = getCatalogueByCode(CATALOGUE_CODE_FIRST);
IdmRoleCatalogueDto catalogueSecond = getCatalogueByCode(CATALOGUE_CODE_SECOND);
Assert.assertNotNull(catalogueFirst);
Assert.assertNotNull(catalogueSecond);
// Delete log
syncLogService.delete(log);
}
use of eu.bcvsolutions.idm.acc.dto.SysSyncRoleConfigDto in project CzechIdMng by bcvsolutions.
the class RoleWorkflowAdSyncTest method n9_testSyncWithWfSituationMissingEntityAddResource.
@Test
public void n9_testSyncWithWfSituationMissingEntityAddResource() {
String USER_SYSTEM_NAME = "TestName001";
String overridedAttributeName = "EAV_ATTRIBUTE";
configurationService.setValue("idm.pub.acc.syncRole.provisioningOfIdentities.system.code", USER_SYSTEM_NAME);
configurationService.setValue("idm.pub.acc.syncRole.system.mapping.attributeMemberOf", helper.getSchemaColumnName(overridedAttributeName));
SysSystemDto userSystem = initData(USER_SYSTEM_NAME, true);
SysSystemDto system = initData();
IdmRoleFilter roleFilter = new IdmRoleFilter();
roleFilter.setText(ROLE_NAME);
List<IdmRoleDto> roles = roleService.find(roleFilter, null).getContent();
Assert.assertEquals(0, roles.size());
Assert.assertNotNull(system);
SysSyncRoleConfigDto config = doCreateSyncConfig(system);
config.setLinkedActionWfKey(wfExampleKey);
config.setMissingAccountActionWfKey(wfExampleKey);
config.setMissingEntityActionWfKey(wfExampleKey);
config.setUnlinkedActionWfKey(wfExampleKey);
config = (SysSyncRoleConfigDto) syncConfigService.save(config);
// Start sync
helper.startSynchronization(config);
SysSyncLogDto log = checkSyncLog(config, SynchronizationActionType.MISSING_ENTITY, 1, OperationResultType.WF);
Assert.assertFalse(log.isRunning());
Assert.assertFalse(log.isContainsError());
roles = roleService.find(roleFilter, null).getContent();
Assert.assertEquals(1, roles.size());
IdmRoleDto role = roles.get(0);
List<IdmFormValueDto> dnValues = formService.getValues(role, ATTRIBUTE_DN);
Assert.assertEquals(1, dnValues.size());
Assert.assertEquals(ATTRIBUTE_DN_VALUE, dnValues.get(0).getValue());
// resource existing
SysRoleSystemAttributeDto systemAttribute = getSystemAttribute(userSystem.getId(), overridedAttributeName, role.getId());
Assert.assertNotNull(systemAttribute);
String transformationScript = "\"" + ATTRIBUTE_DN_VALUE + "\"";
Assert.assertEquals(systemAttribute.getTransformToResourceScript(), transformationScript);
// Delete log
syncLogService.delete(log);
configurationService.deleteValue("idm.pub.acc.syncRole.provisioningOfIdentities.system.code");
configurationService.deleteValue("idm.pub.acc.syncRole.system.mapping.attributeMemberOf");
}
use of eu.bcvsolutions.idm.acc.dto.SysSyncRoleConfigDto in project CzechIdMng by bcvsolutions.
the class RoleWorkflowAdSyncTest method createRolesInSystem.
private void createRolesInSystem() {
SysSystemDto system = initData();
IdmRoleFilter roleFilter = new IdmRoleFilter();
roleFilter.setText(ROLE_NAME);
List<IdmRoleDto> roles = roleService.find(roleFilter, null).getContent();
Assert.assertEquals(0, roles.size());
Assert.assertNotNull(system);
SysSyncRoleConfigDto config = doCreateSyncConfig(system);
config.setLinkedActionWfKey(wfExampleKey);
config.setMissingAccountActionWfKey(wfExampleKey);
config.setMissingEntityActionWfKey(wfExampleKey);
config.setUnlinkedActionWfKey(wfExampleKey);
config = (SysSyncRoleConfigDto) syncConfigService.save(config);
// Start sync
helper.startSynchronization(config);
SysSyncLogDto log = checkSyncLog(config, SynchronizationActionType.MISSING_ENTITY, 1, OperationResultType.WF);
Assert.assertFalse(log.isRunning());
Assert.assertFalse(log.isContainsError());
roles = roleService.find(roleFilter, null).getContent();
Assert.assertEquals(1, roles.size());
IdmRoleDto role = roles.get(0);
List<IdmFormValueDto> dnValues = formService.getValues(role, ATTRIBUTE_DN);
Assert.assertEquals(1, dnValues.size());
Assert.assertEquals(ATTRIBUTE_DN_VALUE, dnValues.get(0).getValue());
IdmRoleCatalogueDto catalogueFirst = getCatalogueByCode(CATALOGUE_CODE_FIRST);
IdmRoleCatalogueDto catalogueSecond = getCatalogueByCode(CATALOGUE_CODE_SECOND);
Assert.assertNotNull(catalogueFirst);
Assert.assertNotNull(catalogueSecond);
// Delete log
syncLogService.delete(log);
}
use of eu.bcvsolutions.idm.acc.dto.SysSyncRoleConfigDto in project CzechIdMng by bcvsolutions.
the class AdGroupConnectorType method createSync.
/**
* Creates role sync.
*/
private void createSync(ConnectorTypeDto connectorType) {
boolean membershipSwitch = Boolean.parseBoolean(connectorType.getMetadata().get(SysSyncRoleConfig_.membershipSwitch.getName()));
boolean assignCatalogueSwitch = Boolean.parseBoolean(connectorType.getMetadata().get(SysSyncRoleConfig_.assignCatalogueSwitch.getName()));
boolean assignRoleSwitch = Boolean.parseBoolean(connectorType.getMetadata().get(SysSyncRoleConfig_.assignRoleSwitch.getName()));
boolean assignRoleRemoveSwitch = Boolean.parseBoolean(connectorType.getMetadata().get(SysSyncRoleConfig_.assignRoleRemoveSwitch.getName()));
boolean removeCatalogueRoleSwitch = Boolean.parseBoolean(connectorType.getMetadata().get(SysSyncRoleConfig_.removeCatalogueRoleSwitch.getName()));
UUID mainRoleCatalogId = connectorType.getMetadata().get(MAIN_ROLE_CATALOG) != null ? UUID.fromString(connectorType.getMetadata().get(MAIN_ROLE_CATALOG)) : null;
String newRoleCatalogCode = connectorType.getMetadata().get(NEW_ROLE_CATALOG);
// Get mapping ID.
String mappingSyncId = connectorType.getMetadata().get(MAPPING_SYNC_ID);
Assert.notNull(mappingSyncId, "ID of mapping cannot be null!");
// Get sync ID.
String roleSyncId = connectorType.getMetadata().get(GROUP_SYNC_ID);
SysSyncRoleConfigDto syncRoleConfigDto = null;
if (roleSyncId == null) {
SysSystemAttributeMappingFilter codeFilter = new SysSystemAttributeMappingFilter();
codeFilter.setSystemMappingId(UUID.fromString(mappingSyncId));
codeFilter.setIdmPropertyName(IdmRole_.baseCode.getName());
SysSystemAttributeMappingDto codeAttribute = getSystemAttributeMappingService().find(codeFilter, null).getContent().stream().filter(SysSystemAttributeMappingDto::isEntityAttribute).findFirst().orElse(null);
Assert.notNull(codeAttribute, "Code attribute cannot be null!");
syncRoleConfigDto = new SysSyncRoleConfigDto();
syncRoleConfigDto.setName(GROUP_SYNC_NAME);
syncRoleConfigDto.setReconciliation(true);
syncRoleConfigDto.setDifferentialSync(false);
syncRoleConfigDto.setSystemMapping(UUID.fromString(mappingSyncId));
syncRoleConfigDto.setUnlinkedAction(SynchronizationUnlinkedActionType.LINK_AND_UPDATE_ENTITY);
syncRoleConfigDto.setMissingEntityAction(SynchronizationMissingEntityActionType.IGNORE);
syncRoleConfigDto.setMissingAccountAction(ReconciliationMissingAccountActionType.IGNORE);
syncRoleConfigDto.setLinkedAction(SynchronizationLinkedActionType.UPDATE_ENTITY);
syncRoleConfigDto.setCorrelationAttribute(codeAttribute.getId());
} else {
syncRoleConfigDto = (SysSyncRoleConfigDto) getSyncConfigService().get(UUID.fromString(roleSyncId));
}
String memberSystemMappingId = connectorType.getMetadata().get(MEMBER_SYSTEM_MAPPING);
SysSystemMappingDto systemMappingDto = null;
if (memberSystemMappingId != null) {
systemMappingDto = getSystemMappingService().get(UUID.fromString(memberSystemMappingId), IdmBasePermission.READ);
}
if (systemMappingDto != null) {
// LDAP groups attribute.
SysSystemAttributeMappingFilter attributeFilter = new SysSystemAttributeMappingFilter();
attributeFilter.setSystemMappingId(systemMappingDto.getId());
attributeFilter.setSchemaAttributeName(LDAP_GROUPS_ATTRIBUTE);
SysSystemAttributeMappingDto ldapGroupsAttribute = getSystemAttributeMappingService().find(attributeFilter, null).getContent().stream().findFirst().orElse(null);
syncRoleConfigDto.setMembershipSwitch(true);
syncRoleConfigDto.setMemberSystemMapping(systemMappingDto.getId());
if (ldapGroupsAttribute != null) {
syncRoleConfigDto.setMemberOfAttribute(ldapGroupsAttribute.getId());
}
// Member DN schema attribute.
SysSchemaAttributeFilter schemaAttributeFilter = new SysSchemaAttributeFilter();
schemaAttributeFilter.setObjectClassId(systemMappingDto.getObjectClass());
schemaAttributeFilter.setName(DN_ATTR_CODE);
SysSchemaAttributeDto dnAttribute = getSchemaAttributeService().find(schemaAttributeFilter, null).getContent().stream().findFirst().orElse(null);
if (dnAttribute != null) {
syncRoleConfigDto.setMemberIdentifierAttribute(dnAttribute.getId());
}
}
syncRoleConfigDto.setAssignRoleSwitch(assignRoleSwitch);
syncRoleConfigDto.setAssignCatalogueSwitch(assignCatalogueSwitch);
syncRoleConfigDto.setAssignRoleRemoveSwitch(assignRoleRemoveSwitch);
syncRoleConfigDto.setMembershipSwitch(membershipSwitch);
syncRoleConfigDto.setRemoveCatalogueRoleSwitch(removeCatalogueRoleSwitch);
if (mainRoleCatalogId != null) {
syncRoleConfigDto.setMainCatalogueRoleNode(mainRoleCatalogId);
} else if (Strings.isNotBlank(newRoleCatalogCode)) {
// Check if new catalog is unique.
IdmRoleCatalogueDto newRoleCatalog = roleCatalogueService.getByCode(newRoleCatalogCode);
if (newRoleCatalog == null) {
// Create new catalog.
newRoleCatalog = new IdmRoleCatalogueDto();
newRoleCatalog.setCode(newRoleCatalogCode);
newRoleCatalog.setName(newRoleCatalogCode);
newRoleCatalog = roleCatalogueService.save(newRoleCatalog, IdmBasePermission.CREATE);
}
syncRoleConfigDto.setMainCatalogueRoleNode(newRoleCatalog.getId());
}
if (syncRoleConfigDto.isRemoveCatalogueRoleSwitch()) {
// If removing of a catalog is enabled, then main catalog will be use as parent.
syncRoleConfigDto.setRemoveCatalogueRoleParentNode(syncRoleConfigDto.getMainCatalogueRoleNode());
}
syncRoleConfigDto = (SysSyncRoleConfigDto) getSyncConfigService().save(syncRoleConfigDto);
connectorType.getMetadata().put(GROUP_SYNC_ID, syncRoleConfigDto.getId().toString());
}
use of eu.bcvsolutions.idm.acc.dto.SysSyncRoleConfigDto in project CzechIdMng by bcvsolutions.
the class DefaultRoleSynchronizationExecutorTest method testSyncRolesCatalogueByDn.
@Test
public /**
* Test create role catalog by DN:
* "CN=WizardGroup01,OU=one,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
* "CN=WizardGroup02,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
* "CN=WizardGroup03,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
* "CN=WizardGroup04,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
* "CN=WizardGroup05,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
*/
void testSyncRolesCatalogueByDn() {
AbstractSysSyncConfigDto syncConfigCustom = createSyncConfig();
SysSystemDto userSystem = helper.createTestResourceSystem(true);
List<SysSystemMappingDto> userSystemMappings = systemMappingService.findBySystem(userSystem, SystemOperationType.PROVISIONING, SystemEntityType.IDENTITY);
Assert.assertNotNull(userSystemMappings);
Assert.assertEquals(1, userSystemMappings.size());
SysSystemMappingDto userMappingDto = userSystemMappings.get(0);
// Switch to the sync.
userMappingDto.setOperationType(SystemOperationType.SYNCHRONIZATION);
userMappingDto = systemMappingService.save(userMappingDto);
List<SysSystemAttributeMappingDto> attributeMappingDtos = schemaAttributeMappingService.findBySystemMapping(userMappingDto);
SysSystemAttributeMappingDto userEmailAttribute = attributeMappingDtos.stream().filter(attribute -> attribute.getName().equalsIgnoreCase(TestHelper.ATTRIBUTE_MAPPING_EMAIL)).findFirst().orElse(null);
Assert.assertNotNull(userEmailAttribute);
Assert.assertFalse(syncConfigService.isRunning(syncConfigCustom));
Assert.assertTrue(syncConfigCustom instanceof SysSyncRoleConfigDto);
SysSyncRoleConfigDto roleConfigDto = (SysSyncRoleConfigDto) syncConfigCustom;
SysSystemMappingDto systemMappingDto = DtoUtils.getEmbedded(syncConfigCustom, SysSyncConfig_.systemMapping, SysSystemMappingDto.class);
SysSchemaObjectClassDto schemaObjectClassDto = DtoUtils.getEmbedded(systemMappingDto, SysSystemMapping_.objectClass, SysSchemaObjectClassDto.class);
UUID roleSystemId = schemaObjectClassDto.getSystem();
Assert.assertNotNull(roleSystemId);
SysSchemaAttributeFilter schemaAttributeFilter = new SysSchemaAttributeFilter();
schemaAttributeFilter.setSystemId(roleSystemId);
schemaAttributeFilter.setObjectClassId(schemaObjectClassDto.getId());
SysSchemaAttributeDto schemaAttributeDto = schemaAttributeService.find(schemaAttributeFilter, null).getContent().stream().filter(attribute -> attribute.getName().equalsIgnoreCase("name")).findFirst().orElse(null);
Assert.assertNotNull(schemaAttributeDto);
SysSystemDto roleSystemDto = new SysSystemDto();
roleSystemDto.setId(roleSystemId);
List<SysSystemMappingDto> roleSystemMappings = systemMappingService.findBySystem(roleSystemDto, SystemOperationType.SYNCHRONIZATION, SystemEntityType.ROLE);
Assert.assertNotNull(roleSystemMappings);
Assert.assertEquals(1, roleSystemMappings.size());
SysSystemMappingDto roleMappingDto = roleSystemMappings.get(0);
// Use ACC script "resolveRoleCatalogueByDn".
IdmScriptFilter scriptFilter = new IdmScriptFilter();
scriptFilter.setCode(MsAdSyncMappingRoleAutoAttributesProcessor.RESOLVE_ROLE_CATALOG_BY_DN_SCRIPT);
scriptFilter.setCategory(IdmScriptCategory.TRANSFORM_FROM);
String catalogTransformationScript = null;
IdmScriptDto scriptDto = scriptService.find(scriptFilter, null).getContent().stream().findFirst().orElse(null);
if (scriptDto != null) {
catalogTransformationScript = this.getPluginExecutors().getPluginFor(IdmScriptCategory.TRANSFORM_FROM).generateTemplate(scriptDto);
}
Assert.assertNotNull(catalogTransformationScript);
// Create mapping attribute for get catalog.
SysSystemAttributeMappingDto roleIdAttribute = new SysSystemAttributeMappingDto();
roleIdAttribute.setEntityAttribute(true);
roleIdAttribute.setUid(false);
roleIdAttribute.setSystemMapping(roleMappingDto.getId());
roleIdAttribute.setExtendedAttribute(false);
roleIdAttribute.setIdmPropertyName(RoleSynchronizationExecutor.ROLE_CATALOGUE_FIELD);
roleIdAttribute.setSchemaAttribute(schemaAttributeDto.getId());
roleIdAttribute.setTransformFromResourceScript(catalogTransformationScript);
roleIdAttribute.setName(helper.createName());
roleIdAttribute = attributeMappingService.save(roleIdAttribute);
IdmRoleCatalogueDto mainRoleCatalogue = getHelper().createRoleCatalogue();
// Enable assign of role catalogue.
roleConfigDto.setAssignCatalogueSwitch(true);
roleConfigDto.setRemoveCatalogueRoleSwitch(false);
roleConfigDto.setMainCatalogueRoleNode(mainRoleCatalogue.getId());
syncConfigCustom = syncConfigService.save(roleConfigDto);
// Init data - roles with DN.
getBean().initDataRolesWithDn();
// Start sync
helper.startSynchronization(syncConfigCustom);
//
SysSyncLogFilter logFilter = new SysSyncLogFilter();
logFilter.setSynchronizationConfigId(syncConfigCustom.getId());
List<SysSyncLogDto> logs = syncLogService.find(logFilter, null).getContent();
Assert.assertEquals(1, logs.size());
SysSyncLogDto log = logs.get(0);
Assert.assertFalse(log.isRunning());
Assert.assertFalse(log.isContainsError());
helper.checkSyncLog(syncConfigCustom, SynchronizationActionType.CREATE_ENTITY, 5, OperationResultType.SUCCESS);
// "CN=WizardGroup01,OU=one,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
// "CN=WizardGroup02,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
// "CN=WizardGroup03,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
// "CN=WizardGroup04,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
// "CN=WizardGroup05,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
// Check catalog structure:
IdmRoleCatalogueDto wizardGroups = roleCatalogueService.getByCode("WizardGroups/" + mainRoleCatalogue.getCode());
Assert.assertNotNull(wizardGroups);
IdmRoleCatalogueDto one = roleCatalogueService.getByCode("one/WizardGroups/" + mainRoleCatalogue.getCode());
Assert.assertNotNull(one);
Assert.assertEquals(wizardGroups.getId(), one.getParent());
IdmRoleCatalogueDto two = roleCatalogueService.getByCode("two/one/WizardGroups/" + mainRoleCatalogue.getCode());
Assert.assertNotNull(two);
Assert.assertEquals(one.getId(), two.getParent());
IdmRoleCatalogueDto one2 = roleCatalogueService.getByCode("one/two/one/WizardGroups/" + mainRoleCatalogue.getCode());
Assert.assertNotNull(one2);
Assert.assertEquals(two.getId(), one2.getParent());
IdmRoleCatalogueRoleFilter roleCatalogueRoleFilter = new IdmRoleCatalogueRoleFilter();
roleCatalogueRoleFilter.setRoleCatalogueId(wizardGroups.getId());
List<IdmRoleCatalogueRoleDto> roleCatalogRoles = roleCatalogueRoleService.find(roleCatalogueRoleFilter, null).getContent();
Assert.assertEquals(2, roleCatalogRoles.size());
Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup04,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup05,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
roleCatalogueRoleFilter.setRoleCatalogueId(one.getId());
roleCatalogRoles = roleCatalogueRoleService.find(roleCatalogueRoleFilter, null).getContent();
Assert.assertEquals(1, roleCatalogRoles.size());
Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup03,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
roleCatalogueRoleFilter.setRoleCatalogueId(two.getId());
roleCatalogRoles = roleCatalogueRoleService.find(roleCatalogueRoleFilter, null).getContent();
Assert.assertEquals(1, roleCatalogRoles.size());
Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup02,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
roleCatalogueRoleFilter.setRoleCatalogueId(one2.getId());
roleCatalogRoles = roleCatalogueRoleService.find(roleCatalogueRoleFilter, null).getContent();
Assert.assertEquals(1, roleCatalogRoles.size());
Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup01,OU=one,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
AccRoleAccountFilter roleAccountFilter = new AccRoleAccountFilter();
roleAccountFilter.setSystemId(roleSystemId);
List<AccRoleAccountDto> roleAccountDtos = roleAccountService.find(roleAccountFilter, null).getContent();
Assert.assertEquals(5, roleAccountDtos.size());
roleAccountDtos.forEach(roleAccountDto -> {
UUID roleId = roleAccountDto.getRole();
IdmRoleCatalogueRoleFilter roleCatalogueFilter = new IdmRoleCatalogueRoleFilter();
roleCatalogueFilter.setRoleId(roleId);
List<IdmRoleCatalogueRoleDto> roleCatalogueRoleDtos = roleCatalogueRoleService.find(roleCatalogueFilter, null).getContent();
Assert.assertEquals(1, roleCatalogueRoleDtos.size());
});
cleanAfterTest(syncConfigCustom, roleSystemId, log, roleAccountDtos);
}
Aggregations