|
@@ -67,7 +67,7 @@ public class ConsensusBasedTests extends TestCase {
|
|
|
config.addConfigAttribute(new SecurityConfig("DENY_FOR_SURE")); // deny
|
|
|
|
|
|
try {
|
|
|
- mgr.decide(auth, null, config);
|
|
|
+ mgr.decide(auth, new Object(), config);
|
|
|
fail("Should have thrown AccessDeniedException");
|
|
|
} catch (AccessDeniedException expected) {
|
|
|
assertTrue(true);
|
|
@@ -85,7 +85,7 @@ public class ConsensusBasedTests extends TestCase {
|
|
|
config.addConfigAttribute(new SecurityConfig("ROLE_1")); // grant
|
|
|
config.addConfigAttribute(new SecurityConfig("DENY_FOR_SURE")); // deny
|
|
|
|
|
|
- mgr.decide(auth, null, config);
|
|
|
+ mgr.decide(auth, new Object(), config);
|
|
|
assertTrue(true);
|
|
|
}
|
|
|
|
|
@@ -97,7 +97,7 @@ public class ConsensusBasedTests extends TestCase {
|
|
|
ConfigAttributeDefinition config = new ConfigAttributeDefinition();
|
|
|
config.addConfigAttribute(new SecurityConfig("ROLE_2")); // grant
|
|
|
|
|
|
- mgr.decide(auth, null, config);
|
|
|
+ mgr.decide(auth, new Object(), config);
|
|
|
assertTrue(true);
|
|
|
}
|
|
|
|
|
@@ -110,7 +110,7 @@ public class ConsensusBasedTests extends TestCase {
|
|
|
config.addConfigAttribute(new SecurityConfig("ROLE_WE_DO_NOT_HAVE")); // deny
|
|
|
|
|
|
try {
|
|
|
- mgr.decide(auth, null, config);
|
|
|
+ mgr.decide(auth, new Object(), config);
|
|
|
fail("Should have thrown AccessDeniedException");
|
|
|
} catch (AccessDeniedException expected) {
|
|
|
assertTrue(true);
|
|
@@ -128,7 +128,7 @@ public class ConsensusBasedTests extends TestCase {
|
|
|
config.addConfigAttribute(new SecurityConfig("IGNORED_BY_ALL")); // abstain
|
|
|
|
|
|
try {
|
|
|
- mgr.decide(auth, null, config);
|
|
|
+ mgr.decide(auth, new Object(), config);
|
|
|
fail("Should have thrown AccessDeniedException");
|
|
|
} catch (AccessDeniedException expected) {
|
|
|
assertTrue(true);
|
|
@@ -145,7 +145,7 @@ public class ConsensusBasedTests extends TestCase {
|
|
|
ConfigAttributeDefinition config = new ConfigAttributeDefinition();
|
|
|
config.addConfigAttribute(new SecurityConfig("IGNORED_BY_ALL")); // abstain
|
|
|
|
|
|
- mgr.decide(auth, null, config);
|
|
|
+ mgr.decide(auth, new Object(), config);
|
|
|
assertTrue(true);
|
|
|
}
|
|
|
|
|
@@ -158,7 +158,7 @@ public class ConsensusBasedTests extends TestCase {
|
|
|
config.addConfigAttribute(new SecurityConfig("ROLE_1")); // grant
|
|
|
config.addConfigAttribute(new SecurityConfig("ROLE_2")); // grant
|
|
|
|
|
|
- mgr.decide(auth, null, config);
|
|
|
+ mgr.decide(auth, new Object(), config);
|
|
|
assertTrue(true);
|
|
|
}
|
|
|
|