Package com.gitblit.models

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


    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

    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

    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

    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

    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

    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

    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

    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

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

    assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
    assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
    assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));

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

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