private void checkTaskAssignee()

in digital-document-service/src/main/java/com/epam/digital/data/platform/dgtldcmnt/service/AuthorizationService.java [85:92]


  private void checkTaskAssignee(DdmSignableTaskDto taskDto, Authentication authentication) {
    if (!authentication.getName().equals(taskDto.getAssignee())) {
      throw new AccessDeniedException(
          String.format(CURRENT_USER_IS_NOT_ASSIGNED_MSG, taskDto.getId()));
    }
    log.trace("Verified that current user {} has assigned to task {}", authentication.getName(),
        taskDto.getId());
  }