"roleAuthorizationPolicyRoleBindingDaoTarget", PentahoSessionHolder.getSession() );
} catch ( ObjectFactoryException e ) {
e.printStackTrace();
}
ITenant tenant = JcrTenantUtils.getTenant();
for ( final MagicAceDefinition def : magicAceDefinitions ) {
match = false;
String substitutedPath = MessageFormat.format( def.path, tenant.getRootFolderAbsolutePath() );
if ( isAllowed( roleBindingDao, def.logicalRole ) ) {
if ( def.applyToTarget ) {
match = path.equals( substitutedPath );
}
if ( !match && def.applyToChildren ) {
match = path.startsWith( substitutedPath + "/" );
// check to see if we should exclude the match due to the exclude list
if ( match && def.exceptChildren != null ) {
for ( String childPath : def.exceptChildren ) {
String substitutedChildPath = MessageFormat.format( childPath, tenant.getRootFolderAbsolutePath() );
if ( path.startsWith( substitutedChildPath + "/" ) ) {
match = false;
break;
}
}