Examples of canPush()


Examples of com.gitblit.models.TeamModel.canPush()

    TeamModel team = new TeamModel("test");
    team.setRepositoryPermission(repository.name, AccessPermission.DELETE);

    assertTrue("team CAN NOT view!", team.canView(repository));
    assertTrue("team CAN NOT clone!", team.canClone(repository));
    assertTrue("team CAN NOT push!", team.canPush(repository));

    assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
    assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
    assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
View Full Code Here

Examples of com.gitblit.models.TeamModel.canPush()

    TeamModel team = new TeamModel("test");
    team.setRepositoryPermission(repository.name, AccessPermission.DELETE);

    assertTrue("team CAN NOT view!", team.canView(repository));
    assertTrue("team CAN NOT clone!", team.canClone(repository));
    assertTrue("team CAN NOT push!", team.canPush(repository));

    assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
    assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
    assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
View Full Code Here

Examples of com.gitblit.models.UserModel.canPush()

          UserModel assignee = gitblit.getUserModel(responsible);
          if (assignee == null) {
            // no account by this name
            sendRejection(cmd, "{0} can not be assigned any tickets because there is no user account by that name", responsible);
            continue;
          } else if (!assignee.canPush(repository)) {
            // account does not have RW permissions
            sendRejection(cmd, "{0} ({1}) can not be assigned any tickets because the user does not have RW permissions for {2}",
                assignee.getDisplayName(), assignee.username, repository.name);
            continue;
          }
View Full Code Here

Examples of com.gitblit.models.UserModel.canPush()

      repository.authorizationControl = AuthorizationControl.NAMED;
      repository.accessRestriction = ar;

      assertTrue("admin CAN NOT view!", user.canView(repository));
      assertTrue("admin CAN NOT clone!", user.canClone(repository));
      assertTrue("admin CAN NOT push!", user.canPush(repository));

      assertTrue("admin CAN NOT create ref!", user.canCreateRef(repository));
      assertTrue("admin CAN NOT delete ref!", user.canDeleteRef(repository));
      assertTrue("admin CAN NOT rewind ref!", user.canRewindRef(repository));
View Full Code Here

Examples of com.gitblit.models.UserModel.canPush()

    UserModel user = UserModel.ANONYMOUS;

    // all permissions, except fork
    assertTrue("anonymous CAN NOT view!", user.canView(repository));
    assertTrue("anonymous CAN NOT clone!", user.canClone(repository));
    assertTrue("anonymous CAN NOT push!", user.canPush(repository));

    assertTrue("anonymous CAN NOT create ref!", user.canCreateRef(repository));
    assertTrue("anonymous CAN NOT delete ref!", user.canDeleteRef(repository));
    assertTrue("anonymous CAN NOT rewind ref!", user.canRewindRef(repository));
View Full Code Here

Examples of com.gitblit.models.UserModel.canPush()

    UserModel user = UserModel.ANONYMOUS;

    assertTrue("anonymous CAN NOT view!", user.canView(repository));
    assertTrue("anonymous CAN NOT clone!", user.canClone(repository));
    assertFalse("anonymous CAN push!", user.canPush(repository));

    assertFalse("anonymous CAN create ref!", user.canCreateRef(repository));
    assertFalse("anonymous CAN delete ref!", user.canDeleteRef(repository));
    assertFalse("anonymous CAN rewind ref!", user.canRewindRef(repository));
View Full Code Here

Examples of com.gitblit.models.UserModel.canPush()

    UserModel user = UserModel.ANONYMOUS;

    assertTrue("anonymous CAN NOT view!", user.canView(repository));
    assertFalse("anonymous CAN clone!", user.canClone(repository));
    assertFalse("anonymous CAN push!", user.canPush(repository));

    assertFalse("anonymous CAN create ref!", user.canCreateRef(repository));
    assertFalse("anonymous CAN delete ref!", user.canDeleteRef(repository));
    assertFalse("anonymous CAN rewind ref!", user.canRewindRef(repository));
View Full Code Here

Examples of com.gitblit.models.UserModel.canPush()

    UserModel user = UserModel.ANONYMOUS;

    assertFalse("anonymous CAN view!", user.canView(repository));
    assertFalse("anonymous CAN clone!", user.canClone(repository));
    assertFalse("anonymous CAN push!", user.canPush(repository));

    assertFalse("anonymous CAN create ref!", user.canCreateRef(repository));
    assertFalse("anonymous CAN delete ref!", user.canDeleteRef(repository));
    assertFalse("anonymous CAN rewind ref!", user.canRewindRef(repository));
View Full Code Here

Examples of com.gitblit.models.UserModel.canPush()

    UserModel user = new UserModel("test");

    // all permissions, except fork
    assertTrue("authenticated CAN NOT view!", user.canView(repository));
    assertTrue("authenticated CAN NOT clone!", user.canClone(repository));
    assertTrue("authenticated CAN NOT push!", user.canPush(repository));

    assertTrue("authenticated CAN NOT create ref!", user.canCreateRef(repository));
    assertTrue("authenticated CAN NOT delete ref!", user.canDeleteRef(repository));
    assertTrue("authenticated CAN NOT rewind ref!", user.canRewindRef(repository));
View Full Code Here

Examples of com.gitblit.models.UserModel.canPush()

    UserModel user = new UserModel("test");

    assertTrue("authenticated CAN NOT view!", user.canView(repository));
    assertTrue("authenticated CAN NOT clone!", user.canClone(repository));
    assertTrue("authenticated CAN NOT push!", user.canPush(repository));

    assertTrue("authenticated CAN NOT create ref!", user.canCreateRef(repository));
    assertTrue("authenticated CAN NOT delete ref!", user.canDeleteRef(repository));
    assertTrue("authenticated CAN NOT rewind ref!", user.canRewindRef(repository));
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.