Add another two test cases to define ACL behavior
Change-Id: I620473c10aebb67e9354cc9c659961ab92b2ddd3
This commit is contained in:
@@ -670,6 +670,24 @@ public class RefControlTest {
|
||||
assertCanUpdate("refs/heads/master", u);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unblockFromParentDoesNotAffectChild() {
|
||||
allow(parent, PUSH, DEVS, "refs/heads/master", true);
|
||||
block(local, PUSH, DEVS, "refs/heads/master");
|
||||
|
||||
ProjectControl u = user(local, DEVS);
|
||||
assertCannotUpdate("refs/heads/master", u);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unblockFromParentDoesNotAffectChildDifferentGroups() {
|
||||
allow(parent, PUSH, DEVS, "refs/heads/master", true);
|
||||
block(local, PUSH, ANONYMOUS_USERS, "refs/heads/master");
|
||||
|
||||
ProjectControl u = user(local, DEVS);
|
||||
assertCannotUpdate("refs/heads/master", u);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unblockMoreSpecificRefInLocalWithExclusiveFlag_Fails() {
|
||||
block(parent, PUSH, ANONYMOUS_USERS, "refs/heads/*");
|
||||
|
||||
Reference in New Issue
Block a user