177178179180181182183184185186187
if (acl == null) { return false; } // Check the ACL list boolean allowed = acl.allAllowed(); if (!allowed) { // Check the allowed users list if (acl.getUsers().contains(ugi.getUserName())) { allowed = true; } else {
117118119120121122123124125126127
new AccessControlList( policyConf.get(service.getServiceKey(), AccessControlList.WILDCARD_ACL_VALUE) ); if (acl.allAllowed()) { newAllowPermissions.add(service.getPermission()); if (LOG.isDebugEnabled()) { LOG.debug("Policy - " + service.getPermission() + " * "); } } else {
2829303132333435363738
public void testWildCardAccessControlList() throws Exception { AccessControlList acl; acl = new AccessControlList("*"); assertTrue(acl.allAllowed()); acl = new AccessControlList(" * "); assertTrue(acl.allAllowed()); acl = new AccessControlList(" *");
3132333435363738394041
acl = new AccessControlList("*"); assertTrue(acl.allAllowed()); acl = new AccessControlList(" * "); assertTrue(acl.allAllowed()); acl = new AccessControlList(" *"); assertTrue(acl.allAllowed()); acl = new AccessControlList("* ");
3435363738394041424344
acl = new AccessControlList(" * "); assertTrue(acl.allAllowed()); acl = new AccessControlList(" *"); assertTrue(acl.allAllowed()); acl = new AccessControlList("* "); assertTrue(acl.allAllowed()); }
3738394041424344454647
acl = new AccessControlList(" *"); assertTrue(acl.allAllowed()); acl = new AccessControlList("* "); assertTrue(acl.allAllowed()); } public void testAccessControlList() throws Exception { AccessControlList acl; Set<String> users;
184185186187188189190191192193194