Examples of canRewindRef()


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

    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));

    assertEquals("team has wrong permission!", AccessPermission.DELETE, team.getRepositoryPermission(repository).permission);
  }

  /**
 
View Full Code Here

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

    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));

    assertEquals("team has wrong permission!", AccessPermission.DELETE, team.getRepositoryPermission(repository).permission);
  }

  /**
 
View Full Code Here

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

      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));

      assertEquals("admin has wrong permission!", AccessPermission.REWIND, user.getRepositoryPermission(repository).permission);

      assertTrue("admin CAN NOT fork!", user.canFork(repository));
View Full Code Here

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

    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));

    assertEquals("anonymous has wrong permission!", AccessPermission.REWIND, user.getRepositoryPermission(repository).permission);

    repository.allowForks = false;
    assertFalse("anonymous CAN fork!", user.canFork(repository));
View Full Code Here

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

    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));

    assertEquals("anonymous has wrong permission!", AccessPermission.CLONE, user.getRepositoryPermission(repository).permission);

    repository.allowForks = false;
    assertFalse("anonymous CAN fork!", user.canFork(repository));
View Full Code Here

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

    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));

    assertEquals("anonymous has wrong permission!", AccessPermission.VIEW, user.getRepositoryPermission(repository).permission);

    repository.allowForks = false;
    assertFalse("anonymous CAN fork!", user.canFork(repository));
View Full Code Here

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

    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));

    assertEquals("anonymous has wrong permission!", AccessPermission.NONE, user.getRepositoryPermission(repository).permission);

    repository.allowForks = false;
    assertFalse("anonymous CAN fork!", user.canFork(repository));
View Full Code Here

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

    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));

    assertEquals("authenticated has wrong permission!", AccessPermission.REWIND, user.getRepositoryPermission(repository).permission);

    user.canFork = false;
    repository.allowForks = false;
View Full Code Here

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

    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));

    assertEquals("authenticated has wrong permission!", AccessPermission.REWIND, user.getRepositoryPermission(repository).permission);

    user.canFork = false;
    repository.allowForks = false;
View Full Code Here

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

    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));

    assertEquals("authenticated has wrong permission!", AccessPermission.REWIND, user.getRepositoryPermission(repository).permission);

    user.canFork = false;
    repository.allowForks = false;
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.