use of eu.bcvsolutions.idm.core.eav.api.dto.IdmFormProjectionDto in project CzechIdMng by bcvsolutions.
the class DefaultIdmIdentityServiceIntegrationTest method testChangeProjectionWithoutCheckPermissions.
@Test
@Transactional
public void testChangeProjectionWithoutCheckPermissions() {
//
IdmIdentityDto identity = getHelper().createIdentity();
IdmFormProjectionDto projection = new IdmFormProjectionDto();
projection.setCode(getHelper().createName());
projection.setOwnerType(lookupService.getOwnerType(IdmIdentityDto.class));
projection = projectionService.save(projection);
//
IdmRoleDto role = getHelper().createRole();
getHelper().createBasePolicy(role.getId(), CoreGroupPermission.IDENTITY, IdmIdentity.class, IdmBasePermission.UPDATE);
getHelper().createIdentityRole(identity, role);
//
try {
getHelper().login(identity);
identity.setFormProjection(projection.getId());
identity = identityService.save(identity);
Assert.assertEquals(projection.getId(), identity.getFormProjection());
} finally {
logout();
}
}
Aggregations