Skip to content
Snippets Groups Projects
Commit 6738b9cd authored by srosse's avatar srosse
Browse files

OO-443: decrease level of the log to debug. If a user has not access to a...

OO-443: decrease level of the log to debug. If a user has not access to a resource, it's not an error
parent 6d1d6012
No related branches found
No related tags found
No related merge requests found
...@@ -105,7 +105,9 @@ public abstract class AbstractHierarchicalIndexer extends DefaultIndexer { ...@@ -105,7 +105,9 @@ public abstract class AbstractHierarchicalIndexer extends DefaultIndexer {
* @return * @return
*/ */
public boolean checkAccess(BusinessControl businessControl, Identity identity, Roles roles) { public boolean checkAccess(BusinessControl businessControl, Identity identity, Roles roles) {
if (isLogDebugEnabled()) logDebug("checkAccess for businessControl=" + businessControl + " identity=" + identity + " roles=" + roles); boolean debug = isLogDebugEnabled();
if(debug) logDebug("checkAccess for businessControl=" + businessControl + " identity=" + identity + " roles=" + roles);
ContextEntry contextEntry = businessControl.popLauncherContextEntry(); ContextEntry contextEntry = businessControl.popLauncherContextEntry();
if (contextEntry != null) { if (contextEntry != null) {
// there is an other context-entry => go further // there is an other context-entry => go further
...@@ -117,7 +119,7 @@ public abstract class AbstractHierarchicalIndexer extends DefaultIndexer { ...@@ -117,7 +119,7 @@ public abstract class AbstractHierarchicalIndexer extends DefaultIndexer {
for (Indexer childIndexer: childIndexers) { for (Indexer childIndexer: childIndexers) {
List<Indexer> foundSubChildIndexers = childIndexer instanceof AbstractHierarchicalIndexer ? ((AbstractHierarchicalIndexer)childIndexer).getIndexerByType(type) : null; List<Indexer> foundSubChildIndexers = childIndexer instanceof AbstractHierarchicalIndexer ? ((AbstractHierarchicalIndexer)childIndexer).getIndexerByType(type) : null;
if (foundSubChildIndexers != null) { if (foundSubChildIndexers != null) {
if (isLogDebugEnabled()) logDebug("took a childindexer for ores= " + ores + " not directly linked (means businesspath is not the same stack as indexer -> childindexer). type= " +type + " . indexer parent-type not on businesspath=" + childIndexer.getSupportedTypeName()); if (debug) logDebug("took a childindexer for ores= " + ores + " not directly linked (means businesspath is not the same stack as indexer -> childindexer). type= " +type + " . indexer parent-type not on businesspath=" + childIndexer.getSupportedTypeName());
for(Indexer foundSubChildIndexer:foundSubChildIndexers) { for(Indexer foundSubChildIndexer:foundSubChildIndexers) {
boolean allow = foundSubChildIndexer.checkAccess(contextEntry, businessControl, identity, roles) boolean allow = foundSubChildIndexer.checkAccess(contextEntry, businessControl, identity, roles)
&& super.checkAccess(contextEntry, businessControl, identity, roles); && super.checkAccess(contextEntry, businessControl, identity, roles);
...@@ -127,7 +129,7 @@ public abstract class AbstractHierarchicalIndexer extends DefaultIndexer { ...@@ -127,7 +129,7 @@ public abstract class AbstractHierarchicalIndexer extends DefaultIndexer {
} }
} }
} }
logError("could not find an indexer for type="+type + " businessControl="+businessControl + " identity=" + identity, null); if(debug) logDebug("could not find an indexer for type="+type + " businessControl="+businessControl + " identity=" + identity, null);
} else { } else {
for(Indexer indexer:indexers) { for(Indexer indexer:indexers) {
boolean allow = indexer.checkAccess(contextEntry, businessControl, identity, roles) boolean allow = indexer.checkAccess(contextEntry, businessControl, identity, roles)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment