@@ -617,11 +617,20 @@ private boolean checkAll(HttpServletRequest request, String cache, Nameable enti
617
617
618
618
private boolean performCheck (Nameable entity , Predicate <AuthorizationPluginWrapper > predicate ) {
619
619
boolean overallDecision = true ;
620
+ LOGGER .log (Level .FINEST , "Authorization for \" {0}\" " ,
621
+ new Object []{entity .getName ()});
620
622
for (AuthorizationPluginWrapper plugin : getPlugins ()) {
621
623
// run the plugin's test method
622
624
try {
625
+ LOGGER .log (Level .FINEST , "Plugin \" {0}\" [{1}] testing a name \" {2}\" " ,
626
+ new Object []{plugin .getClassname (), plugin .getRole (), entity .getName ()});
627
+
623
628
boolean pluginDecision = predicate .test (plugin );
624
629
630
+ LOGGER .log (Level .FINEST , "Plugin \" {0}\" [{1}] testing a name \" {2}\" => {3}" ,
631
+ new Object []{plugin .getClassname (), plugin .getRole (), entity .getName (),
632
+ pluginDecision ? "true" : "false" });
633
+
625
634
if (!pluginDecision && plugin .isRequired ()) {
626
635
// required sets a failure but still invokes all other plugins
627
636
overallDecision = false ;
@@ -642,6 +651,10 @@ private boolean performCheck(Nameable entity, Predicate<AuthorizationPluginWrapp
642
651
entity .getName ()),
643
652
ex );
644
653
654
+ LOGGER .log (Level .FINEST , "Plugin \" {0}\" [{1}] testing a name \" {2}\" => {3}" ,
655
+ new Object []{plugin .getClassname (), plugin .getRole (), entity .getName (),
656
+ "false (failed)" });
657
+
645
658
// set the return value to false for this faulty plugin
646
659
if (!plugin .isSufficient ()) {
647
660
overallDecision = false ;
@@ -652,6 +665,8 @@ private boolean performCheck(Nameable entity, Predicate<AuthorizationPluginWrapp
652
665
}
653
666
}
654
667
}
668
+ LOGGER .log (Level .FINEST , "Authorization for \" {0}\" => {1}" ,
669
+ new Object []{entity .getName (), overallDecision ? "true" : "false" });
655
670
return overallDecision ;
656
671
}
657
672
}
0 commit comments