Added user substitution during ACL pattern mathing

This commit is contained in:
andrea
2015-05-26 22:51:16 +02:00
parent db4b7ca192
commit 78eddadac4
2 changed files with 16 additions and 4 deletions
@@ -140,10 +140,18 @@ public class AuthorizationsCollectorTest {
}
@Test
public void testParsePatternClientLineACL() throws ParseException {
public void testPatternClientLineACL() throws ParseException {
authorizator.parse("pattern read /weather/italy/%c");
//Verify
assertTrue(authorizator.canRead("/weather/italy/anemometer1", "", "anemometer1"));
}
@Test
public void testPatternClientAndUserLineACL() throws ParseException {
authorizator.parse("pattern read /weather/%u/%c");
//Verify
assertTrue(authorizator.canRead("/weather/italy/anemometer1", "italy", "anemometer1"));
}
}