Fixed a bug in PermissionRule class which broke the Schema_53.
After the commit 76409cf7 the PermissionRule.setDeny(boolean newDeny)
method was broken as the newDeny argument wasn't honored any more.
The Schema_53 made use of this method and was broken after this change.
This change removes the parameter from the setDeny method which makes its
meaning clear. This is also necessary as in the near future we will have a
new Action value "BLOCK" and then setDeny(false) would become really
unintuitive.
Change-Id: I6fd685b13c5854461a19e19bc5b74c0fc256db8a
This commit is contained in:
@@ -145,7 +145,7 @@ public class RefControlTest extends TestCase {
|
||||
|
||||
public void testInheritRead_OverrideWithDeny() {
|
||||
grant(parent, READ, registered, "refs/*");
|
||||
grant(local, READ, registered, "refs/*").setDeny(true);
|
||||
grant(local, READ, registered, "refs/*").setDeny();
|
||||
|
||||
ProjectControl u = user();
|
||||
assertFalse("can't read", u.isVisible());
|
||||
@@ -153,7 +153,7 @@ public class RefControlTest extends TestCase {
|
||||
|
||||
public void testInheritRead_AppendWithDenyOfRef() {
|
||||
grant(parent, READ, registered, "refs/*");
|
||||
grant(local, READ, registered, "refs/heads/*").setDeny(true);
|
||||
grant(local, READ, registered, "refs/heads/*").setDeny();
|
||||
|
||||
ProjectControl u = user();
|
||||
assertTrue("can read", u.isVisible());
|
||||
@@ -164,7 +164,7 @@ public class RefControlTest extends TestCase {
|
||||
|
||||
public void testInheritRead_OverridesAndDeniesOfRef() {
|
||||
grant(parent, READ, registered, "refs/*");
|
||||
grant(local, READ, registered, "refs/*").setDeny(true);
|
||||
grant(local, READ, registered, "refs/*").setDeny();
|
||||
grant(local, READ, registered, "refs/heads/*");
|
||||
|
||||
ProjectControl u = user();
|
||||
@@ -176,7 +176,7 @@ public class RefControlTest extends TestCase {
|
||||
|
||||
public void testInheritSubmit_OverridesAndDeniesOfRef() {
|
||||
grant(parent, SUBMIT, registered, "refs/*");
|
||||
grant(local, SUBMIT, registered, "refs/*").setDeny(true);
|
||||
grant(local, SUBMIT, registered, "refs/*").setDeny();
|
||||
grant(local, SUBMIT, registered, "refs/heads/*");
|
||||
|
||||
ProjectControl u = user();
|
||||
|
||||
Reference in New Issue
Block a user