String[] supportedPaths = params.getConfigValue(CugConstants.PARAM_CUG_SUPPORTED_PATHS, new String[0]);
if (!enabled || supportedPaths.length == 0 || getExclude().isExcluded(principals)) {
return EmptyPermissionProvider.getInstance();
} else {
ControlFlag flag = ControlFlag.valueOf(params.getConfigValue(AggregatedPermissionProvider.PARAM_CONTROL_FLAG, ControlFlag.REQUISITE_NAME));
return new CugPermissionProvider(root, principals, supportedPaths, flag, getContext());
}
}