Search in sources :

Example 11 with IdmDelegationDefinitionDto

use of eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto in project CzechIdMng by bcvsolutions.

the class DelegationDefinitionByDelegatorEvaluatorTest method testRead.

@Test
public void testRead() {
    IdmIdentityDto delegatorOne = getHelper().createIdentity();
    IdmIdentityDto delegatorTwo = getHelper().createIdentity();
    IdmIdentityContractDto primeContactDelegatorOne = getHelper().getPrimeContract(delegatorOne);
    IdmIdentityDto delegateOne = getHelper().createIdentity();
    IdmIdentityDto delegateTwo = getHelper().createIdentity();
    // Create default delegation One.
    IdmDelegationDefinitionDto definitionOne = new IdmDelegationDefinitionDto();
    definitionOne.setType(DefaultDelegationType.NAME);
    definitionOne.setDelegator(delegatorOne.getId());
    definitionOne.setDelegate(delegateOne.getId());
    definitionOne = delegationDefinitionService.save(definitionOne);
    // Create default delegation Two.
    IdmDelegationDefinitionDto definitionTwo = new IdmDelegationDefinitionDto();
    definitionTwo.setType(DefaultDelegationType.NAME);
    definitionTwo.setDelegator(delegatorTwo.getId());
    definitionTwo.setDelegate(delegateTwo.getId());
    delegationDefinitionService.save(definitionTwo);
    // 
    List<IdmIdentityDto> identities;
    List<IdmIdentityContractDto> contracts;
    List<IdmDelegationDefinitionDto> delegationDefinitions;
    IdmRoleDto roleWithPermissions = getHelper().createRole();
    // 
    getHelper().createIdentityRole(delegatorOne, roleWithPermissions);
    getHelper().createIdentityRole(delegatorTwo, roleWithPermissions);
    // check - read without policy
    try {
        getHelper().login(delegatorOne);
        // 
        identities = identityService.find(null, IdmBasePermission.READ).getContent();
        Assert.assertTrue(identities.isEmpty());
        contracts = contractService.find(null, IdmBasePermission.READ).getContent();
        Assert.assertTrue(contracts.isEmpty());
        delegationDefinitions = delegationDefinitionService.find(null, IdmBasePermission.READ).getContent();
        Assert.assertTrue(delegationDefinitions.isEmpty());
    } finally {
        logout();
    }
    // 
    // create authorization policy - assign to role
    // identity
    getHelper().createAuthorizationPolicy(roleWithPermissions.getId(), CoreGroupPermission.IDENTITY, IdmIdentity.class, SelfIdentityEvaluator.class, IdmBasePermission.READ);
    // delegation transitively
    getHelper().createAuthorizationPolicy(roleWithPermissions.getId(), CoreGroupPermission.DELEGATIONDEFINITION, IdmDelegationDefinition.class, DelegationDefinitionByDelegatorEvaluator.class);
    // 
    try {
        getHelper().login(delegatorOne);
        // 
        // without update permission
        identities = identityService.find(null, IdmBasePermission.UPDATE).getContent();
        Assert.assertTrue(identities.isEmpty());
        contracts = contractService.find(null, IdmBasePermission.UPDATE).getContent();
        Assert.assertTrue(contracts.isEmpty());
        delegationDefinitions = delegationDefinitionService.find(null, IdmBasePermission.UPDATE).getContent();
        Assert.assertTrue(delegationDefinitions.isEmpty());
        // 
        // evaluate	access
        identities = identityService.find(null, IdmBasePermission.READ).getContent();
        Assert.assertEquals(1, identities.size());
        Assert.assertEquals(delegatorOne.getId(), identities.get(0).getId());
        contracts = contractService.find(null, IdmBasePermission.READ).getContent();
        Assert.assertEquals(0, contracts.size());
        delegationDefinitions = delegationDefinitionService.find(null, IdmBasePermission.READ).getContent();
        Assert.assertEquals(1, delegationDefinitions.size());
        Assert.assertEquals(definitionOne.getId(), delegationDefinitions.get(0).getId());
        // 
        Set<String> permissions = identityService.getPermissions(delegatorOne);
        Assert.assertEquals(1, permissions.size());
        Assert.assertTrue(permissions.stream().anyMatch(p -> p.equals(IdmBasePermission.READ.name())));
        permissions = contractService.getPermissions(primeContactDelegatorOne);
        Assert.assertEquals(0, permissions.size());
        permissions = delegationDefinitionService.getPermissions(definitionOne);
        Assert.assertEquals(1, permissions.size());
        Assert.assertTrue(permissions.stream().anyMatch(p -> p.equals(IdmBasePermission.READ.name())));
    } finally {
        logout();
    }
}
Also used : IdmIdentity(eu.bcvsolutions.idm.core.model.entity.IdmIdentity) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) DelegationDefinitionByDelegatorEvaluator(eu.bcvsolutions.idm.core.security.evaluator.delegation.DelegationDefinitionByDelegatorEvaluator) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) DefaultDelegationType(eu.bcvsolutions.idm.core.model.delegation.type.DefaultDelegationType) IdmDelegationDefinition(eu.bcvsolutions.idm.core.model.entity.IdmDelegationDefinition) Set(java.util.Set) Autowired(org.springframework.beans.factory.annotation.Autowired) Test(org.junit.Test) CoreGroupPermission(eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission) List(java.util.List) IdmBasePermission(eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) SelfIdentityEvaluator(eu.bcvsolutions.idm.core.security.evaluator.identity.SelfIdentityEvaluator) AbstractEvaluatorIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractEvaluatorIntegrationTest) IdmDelegationDefinitionService(eu.bcvsolutions.idm.core.api.service.IdmDelegationDefinitionService) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) Assert(org.junit.Assert) IdmDelegationDefinitionDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) Transactional(org.springframework.transaction.annotation.Transactional) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmDelegationDefinitionDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) Test(org.junit.Test) AbstractEvaluatorIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractEvaluatorIntegrationTest)

Example 12 with IdmDelegationDefinitionDto

use of eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto in project CzechIdMng by bcvsolutions.

the class ManualWorkflowTaskDelegationBulkAction method findDelegationDefinition.

/**
 * Find delegation definitions for delegator and delegate.
 *
 * @param delegateId
 * @param delegatorId
 * @return
 */
private IdmDelegationDefinitionDto findDelegationDefinition(UUID delegateId, UUID delegatorId) {
    IdmDelegationDefinitionFilter definitionFilter = new IdmDelegationDefinitionFilter();
    definitionFilter.setValid(Boolean.TRUE);
    definitionFilter.setType(ManualTaskDelegationType.NAME);
    definitionFilter.setDelegateId(delegateId);
    definitionFilter.setDelegatorId(delegatorId);
    List<IdmDelegationDefinitionDto> delegations = delegationDefinitionService.find(definitionFilter, null).getContent();
    IdmDelegationDefinitionDto delegationDefinition;
    if (CollectionUtils.isEmpty(delegations)) {
        delegationDefinition = new IdmDelegationDefinitionDto();
        delegationDefinition.setDelegate(delegateId);
        delegationDefinition.setDelegator(delegatorId);
        delegationDefinition.setType(ManualTaskDelegationType.NAME);
        delegationDefinition = delegationDefinitionService.save(delegationDefinition);
    } else {
        // Should be only one.
        delegationDefinition = delegations.get(0);
    }
    return delegationDefinition;
}
Also used : IdmDelegationDefinitionDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto) IdmDelegationDefinitionFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmDelegationDefinitionFilter)

Example 13 with IdmDelegationDefinitionDto

use of eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto in project CzechIdMng by bcvsolutions.

the class ManualWorkflowTaskDelegationBulkAction method processDto.

@Override
protected OperationResult processDto(WorkflowTaskInstanceAbstractDto task) {
    IdmBulkActionDto action = this.getAction();
    Assert.notNull(action, "Bulk action is required.");
    IdmIdentityDto delegator = findDelegator();
    if (delegator == null) {
        throw new ResultCodeException(CoreResultCode.MANUAL_TASK_DELEGATION_DELEGATOR_MISSING);
    }
    UUID delegateId = this.getDelegateId();
    UUID delegatorId = delegator.getId();
    Assert.notNull(delegateId, "Delegate ID cannot be null!");
    IdmIdentityDto delegate = identityService.get(delegateId);
    Assert.notNull(delegate, "Delegate cannot be null!");
    boolean delegatorIsCandidate = task.getIdentityLinks().stream().filter(identityLink -> IdentityLinkType.CANDIDATE.equals(identityLink.getType()) || IdentityLinkType.ASSIGNEE.equals(identityLink.getType())).filter(identityLink -> UUID.fromString(identityLink.getUserId()).equals(delegatorId)).findFirst().isPresent();
    // Delegator have to be candidate or assigned task user!
    if (!delegatorIsCandidate) {
        throw new ResultCodeException(CoreResultCode.MANUAL_TASK_DELEGATION_DELEGATOR_IS_NOT_CANDIDATE, ImmutableMap.of("delegator", delegator.getUsername(), "task", task.getId()));
    }
    // Find delegation definitions for delegator and delegate.
    IdmDelegationDefinitionDto delegationDefinition = findDelegationDefinition(delegateId, delegatorId);
    WorkflowTaskInstanceDto mockTask = new WorkflowTaskInstanceDto();
    mockTask.setId(task.getId().toString());
    // Create delegation for this task.
    delegationManager.delegate(mockTask, delegationDefinition);
    // Add delegate as task candidat.
    taskService.addCandidateUser(mockTask.getId(), delegationDefinition.getDelegate().toString());
    // Delete delegator form the task's candidats.
    taskService.deleteCandidateUser(mockTask.getId(), delegationDefinition.getDelegator().toString());
    // Add delegator as participant to this task.
    taskService.addUserIdentityLink(mockTask.getId(), delegationDefinition.getDelegator().toString(), IdentityLinkType.PARTICIPANT);
    return new OperationResult.Builder(OperationState.EXECUTED).build();
}
Also used : ResultModels(eu.bcvsolutions.idm.core.api.dto.ResultModels) DelegationManager(eu.bcvsolutions.idm.core.api.service.DelegationManager) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) IdmDelegationDefinitionFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmDelegationDefinitionFilter) TaskService(org.activiti.engine.TaskService) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) Autowired(org.springframework.beans.factory.annotation.Autowired) WorkflowTaskInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowTaskInstanceDto) IdentityLinkType(org.activiti.engine.task.IdentityLinkType) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) CoreGroupPermission(eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission) IdmBasePermission(eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission) Lists(com.google.common.collect.Lists) BaseEntity(eu.bcvsolutions.idm.core.api.entity.BaseEntity) CollectionUtils(org.apache.commons.collections.CollectionUtils) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) WorkflowTaskInstanceService(eu.bcvsolutions.idm.core.workflow.service.WorkflowTaskInstanceService) BaseFaceType(eu.bcvsolutions.idm.core.eav.api.domain.BaseFaceType) WorkflowFilterDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto) Description(org.springframework.context.annotation.Description) ImmutableMap(com.google.common.collect.ImmutableMap) AbstractBulkAction(eu.bcvsolutions.idm.core.api.bulk.action.AbstractBulkAction) WorkflowTaskInstanceAbstractDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowTaskInstanceAbstractDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) ReadWriteDtoService(eu.bcvsolutions.idm.core.api.service.ReadWriteDtoService) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) UUID(java.util.UUID) List(java.util.List) Component(org.springframework.stereotype.Component) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) CoreResultCode(eu.bcvsolutions.idm.core.api.domain.CoreResultCode) ManualTaskDelegationType(eu.bcvsolutions.idm.core.model.delegation.type.ManualTaskDelegationType) Lazy(org.springframework.context.annotation.Lazy) BaseDto(eu.bcvsolutions.idm.core.api.dto.BaseDto) DefaultResultModel(eu.bcvsolutions.idm.core.api.dto.DefaultResultModel) IdmDelegationDefinitionService(eu.bcvsolutions.idm.core.api.service.IdmDelegationDefinitionService) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) IdmDelegationDefinitionDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto) Assert(org.springframework.util.Assert) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmDelegationDefinitionDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto) WorkflowTaskInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowTaskInstanceDto) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) UUID(java.util.UUID)

Example 14 with IdmDelegationDefinitionDto

use of eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto in project CzechIdMng by bcvsolutions.

the class DelegationCreateNotificationProcessor method process.

@Override
public EventResult<IdmDelegationDto> process(EntityEvent<IdmDelegationDto> event) {
    IdmDelegationDto dto = event.getContent();
    IdmDelegationDefinitionDto definition = lookupService.lookupEmbeddedDto(dto, IdmDelegation_.definition);
    Assert.notNull(definition, "Delegate definition cannot be null!");
    Assert.notNull(definition.getType(), "Delegate type cannot be null!");
    Assert.notNull(definition.getDelegator(), "Delegator cannot be null!");
    Assert.notNull(definition.getDelegate(), "Delegate cannot be null!");
    IdmIdentityDto delegator = identityService.get(definition.getDelegator());
    IdmIdentityDto delegate = identityService.get(definition.getDelegate());
    // UUID currentUserId = securityService.getCurrentId();
    // Send notification to the delegate.
    sendNotification(CoreModuleDescriptor.TOPIC_DELEGATION_INSTANCE_CREATED_TO_DELEGATE, dto, definition, delegator, delegate, delegate);
    return new DefaultEventResult<>(event, this);
}
Also used : IdmDelegationDefinitionDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto) DefaultEventResult(eu.bcvsolutions.idm.core.api.event.DefaultEventResult) IdmDelegationDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)

Example 15 with IdmDelegationDefinitionDto

use of eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto in project CzechIdMng by bcvsolutions.

the class WorkflowTaskInstanceController method addDelegationToTask.

/**
 * Find and add definition of the delegation connected with this task.
 *
 * @param dto
 */
private void addDelegationToTask(WorkflowTaskInstanceDto dto, BasePermission... permission) {
    if (dto != null && dto.getId() != null) {
        // We need to create mock task, because DTO can be instance of historic task here.
        WorkflowTaskInstanceDto mockTask = new WorkflowTaskInstanceDto();
        mockTask.setId(dto.getId());
        UUID currentUserId = securityService.getCurrentId();
        boolean currentUserIsCandidate = dto.getIdentityLinks().stream().filter(identityLink -> IdentityLinkType.CANDIDATE.equals(identityLink.getType()) || IdentityLinkType.ASSIGNEE.equals(identityLink.getType())).anyMatch(identityLink -> currentUserId != null && UUID.fromString(identityLink.getUserId()).equals(currentUserId));
        boolean filterOnlyForCurrentUser = currentUserIsCandidate && !workflowTaskInstanceService.canReadAllTask(permission);
        List<IdmDelegationDto> delegations = delegationManager.findDelegationForOwner(mockTask, permission).stream().filter(delegation -> {
            // Filter only delegation where delegator or delegate is logged user (and user is not admin).
            if (!filterOnlyForCurrentUser) {
                return true;
            }
            IdmDelegationDefinitionDto definition = DtoUtils.getEmbedded(delegation, IdmDelegation_.definition.getName(), IdmDelegationDefinitionDto.class);
            return definition.getDelegate().equals(currentUserId) || definition.getDelegator().equals(currentUserId);
        }).sorted(Comparator.comparing(IdmDelegationDto::getCreated)).collect(Collectors.toList());
        // TODO: ONLY first delegation definition is sets to the task!
        if (!CollectionUtils.isEmpty(delegations)) {
            Collections.reverse(delegations);
            IdmDelegationDto delegation = delegations.get(0);
            IdmDelegationDefinitionDto definition = DtoUtils.getEmbedded(delegation, IdmDelegation_.definition.getName(), IdmDelegationDefinitionDto.class);
            dto.setDelegationDefinition(definition);
        }
    }
}
Also used : IdmDelegation_(eu.bcvsolutions.idm.core.model.entity.IdmDelegation_) FormDataWrapperDto(eu.bcvsolutions.idm.core.workflow.model.dto.FormDataWrapperDto) PathVariable(org.springframework.web.bind.annotation.PathVariable) RequestParam(org.springframework.web.bind.annotation.RequestParam) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) Autowired(org.springframework.beans.factory.annotation.Autowired) ApiParam(io.swagger.annotations.ApiParam) WorkflowTaskInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowTaskInstanceDto) SecurityService(eu.bcvsolutions.idm.core.security.api.service.SecurityService) Valid(javax.validation.Valid) CoreGroupPermission(eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission) ApiOperation(io.swagger.annotations.ApiOperation) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) BasePermission(eu.bcvsolutions.idm.core.security.api.domain.BasePermission) WorkflowTaskInstanceService(eu.bcvsolutions.idm.core.workflow.service.WorkflowTaskInstanceService) Pageable(org.springframework.data.domain.Pageable) AuthorizationScope(io.swagger.annotations.AuthorizationScope) EntityNotFoundException(eu.bcvsolutions.idm.core.api.exception.EntityNotFoundException) IdmDelegationDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDto) WorkflowTaskInstanceAbstractDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowTaskInstanceAbstractDto) MediaType(org.springframework.http.MediaType) Set(java.util.Set) RequestMethod(org.springframework.web.bind.annotation.RequestMethod) UUID(java.util.UUID) Page(org.springframework.data.domain.Page) RestController(org.springframework.web.bind.annotation.RestController) Collectors(java.util.stream.Collectors) Serializable(java.io.Serializable) List(java.util.List) AbstractReadDtoController(eu.bcvsolutions.idm.core.api.rest.AbstractReadDtoController) ResultModels(eu.bcvsolutions.idm.core.api.dto.ResultModels) DelegationManager(eu.bcvsolutions.idm.core.api.service.DelegationManager) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) BulkActionManager(eu.bcvsolutions.idm.core.api.bulk.action.BulkActionManager) IdentityLinkType(org.activiti.engine.task.IdentityLinkType) RequestBody(org.springframework.web.bind.annotation.RequestBody) IdmBasePermission(eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission) SwaggerConfig(eu.bcvsolutions.idm.core.api.config.swagger.SwaggerConfig) CollectionUtils(org.apache.commons.collections.CollectionUtils) WorkflowProcessInstanceService(eu.bcvsolutions.idm.core.workflow.service.WorkflowProcessInstanceService) WorkflowFilterDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto) Api(io.swagger.annotations.Api) MultiValueMap(org.springframework.util.MultiValueMap) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) WorkflowHistoricTaskInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowHistoricTaskInstanceDto) CoreResultCode(eu.bcvsolutions.idm.core.api.domain.CoreResultCode) BaseController(eu.bcvsolutions.idm.core.api.rest.BaseController) BaseDtoController(eu.bcvsolutions.idm.core.api.rest.BaseDtoController) PageableDefault(org.springframework.data.web.PageableDefault) Resources(org.springframework.hateoas.Resources) ResponseEntity(org.springframework.http.ResponseEntity) IdmDelegationDefinitionDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto) Comparator(java.util.Comparator) Authorization(io.swagger.annotations.Authorization) Collections(java.util.Collections) IdmDelegationDefinitionDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto) WorkflowTaskInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowTaskInstanceDto) IdmDelegationDto(eu.bcvsolutions.idm.core.api.dto.IdmDelegationDto) UUID(java.util.UUID)

Aggregations

IdmDelegationDefinitionDto (eu.bcvsolutions.idm.core.api.dto.IdmDelegationDefinitionDto)28 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)18 Test (org.junit.Test)14 UUID (java.util.UUID)11 WorkflowTaskInstanceDto (eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowTaskInstanceDto)10 List (java.util.List)10 Autowired (org.springframework.beans.factory.annotation.Autowired)10 IdmDelegationDto (eu.bcvsolutions.idm.core.api.dto.IdmDelegationDto)9 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)9 IdmIdentityContractDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)8 IdmDelegationDefinitionService (eu.bcvsolutions.idm.core.api.service.IdmDelegationDefinitionService)8 IdmIdentityService (eu.bcvsolutions.idm.core.api.service.IdmIdentityService)8 ResultCodeException (eu.bcvsolutions.idm.core.api.exception.ResultCodeException)7 DefaultDelegationType (eu.bcvsolutions.idm.core.model.delegation.type.DefaultDelegationType)7 ChangeIdentityPermissionTest (eu.bcvsolutions.idm.core.workflow.permissions.ChangeIdentityPermissionTest)7 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)7 Assert (org.junit.Assert)7 CoreGroupPermission (eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission)6 IdmBasePermission (eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission)6 AbstractEvaluatorIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractEvaluatorIntegrationTest)6