Examples of userLogin()


Examples of cn.com.neo.action.UserAction.userLogin()

    String cmd = msg.getCmd();
//    logger.info("�յ���Ϣ:" + cmd);
    System.out.println("�յ���Ϣ:" + cmd);
    if(CommandDefine.LOGIN.equals(cmd)) {
      UserAction userAct = (UserAction) BeanFactory.getInstance().getBean("userAction", UserAction.class);
      userAct.userLogin(session, message);
    } else if(CommandDefine.EXIT.equals(cmd)) {
      UserAction userAct = (UserAction) BeanFactory.getInstance().getBean("userAction", UserAction.class);
      userAct.userExit(session, message);
    } else {
//      logger.warn("δ֪���" + cmd);
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssueComment.userLogin()

    DefaultIssueComment comment = changeDto.toComment();
    assertThat(comment.key()).isEqualTo("EFGH");
    assertThat(comment.markdownText()).isEqualTo("Some text");
    assertThat(comment.createdAt()).isNotNull();
    assertThat(comment.updatedAt()).isNotNull();
    assertThat(comment.userLogin()).isEqualTo("emmerik");
    assertThat(comment.issueKey()).isEqualTo("ABCDE");
  }

  @Test
  public void to_field_diffs_with_issue_creation_date() throws Exception {
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssueComment.userLogin()

    DefaultIssueComment first = comments.get(0);
    assertThat(first.markdownText()).isEqualTo("old comment");


    DefaultIssueComment second = comments.get(1);
    assertThat(second.userLogin()).isEqualTo("arthur");
    assertThat(second.key()).isEqualTo("FGHIJ");
    assertThat(second.markdownText()).isEqualTo("recent comment");
  }

  @Test
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssueComment.userLogin()

    DefaultIssueComment comment = dao.selectCommentByKey("FGHIJ");
    assertThat(comment).isNotNull();
    assertThat(comment.key()).isEqualTo("FGHIJ");
    assertThat(comment.key()).isEqualTo("FGHIJ");
    assertThat(comment.userLogin()).isEqualTo("arthur");

    assertThat(dao.selectCommentByKey("UNKNOWN")).isNull();
  }

  @Test
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssueComment.userLogin()

  public IssueComment deleteComment(String commentKey, UserSession userSession) {
    DefaultIssueComment comment = changeDao.selectCommentByKey(commentKey);
    if (comment == null) {
      throw new NotFoundException("Comment not found: " + commentKey);
    }
    if (Strings.isNullOrEmpty(comment.userLogin()) || !Objects.equal(comment.userLogin(), userSession.login())) {
      throw new ForbiddenException("You can only delete your own comments");
    }

    // check authorization
    issueService.getByKey(comment.issueKey());
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssueComment.userLogin()

  public IssueComment deleteComment(String commentKey, UserSession userSession) {
    DefaultIssueComment comment = changeDao.selectCommentByKey(commentKey);
    if (comment == null) {
      throw new NotFoundException("Comment not found: " + commentKey);
    }
    if (Strings.isNullOrEmpty(comment.userLogin()) || !Objects.equal(comment.userLogin(), userSession.login())) {
      throw new ForbiddenException("You can only delete your own comments");
    }

    // check authorization
    issueService.getByKey(comment.issueKey());
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssueComment.userLogin()

      throw new BadRequestException("Cannot add empty comments to an issue");
    }
    if (comment == null) {
      throw new NotFoundException("Comment not found: " + commentKey);
    }
    if (Strings.isNullOrEmpty(comment.userLogin()) || !Objects.equal(comment.userLogin(), userSession.login())) {
      throw new ForbiddenException("You can only edit your own comments");
    }

    // check authorization
    issueService.getByKey(comment.issueKey());
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssueComment.userLogin()

      throw new BadRequestException("Cannot add empty comments to an issue");
    }
    if (comment == null) {
      throw new NotFoundException("Comment not found: " + commentKey);
    }
    if (Strings.isNullOrEmpty(comment.userLogin()) || !Objects.equal(comment.userLogin(), userSession.login())) {
      throw new ForbiddenException("You can only edit your own comments");
    }

    // check authorization
    issueService.getByKey(comment.issueKey());
View Full Code Here

Examples of org.sonar.api.issue.internal.FieldDiffs.userLogin()

      .setChangeData("Some text")
      .setIssueKey("ABCDE")
      .setIssueChangeCreationDate(new Date());

    FieldDiffs diffs = changeDto.toFieldDiffs();
    assertThat(diffs.userLogin()).isEqualTo("emmerik");
    assertThat(diffs.issueKey()).isEqualTo("ABCDE");
    assertThat(diffs.creationDate()).isNotNull();
  }

  @Test
View Full Code Here

Examples of org.sonar.api.issue.internal.FieldDiffs.userLogin()

      .setChangeData("Some text")
      .setIssueKey("ABCDE")
      .setCreatedAt(new Date());

    FieldDiffs diffs = changeDto.toFieldDiffs();
    assertThat(diffs.userLogin()).isEqualTo("emmerik");
    assertThat(diffs.issueKey()).isEqualTo("ABCDE");
    assertThat(diffs.creationDate()).isNotNull();
  }

  @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.