mirror of https://github.com/apache/lucene.git
SOLR-14237: Fix HDFS nightly test failure
This commit is contained in:
parent
26c9fce5db
commit
9ed5b6a218
|
@ -323,8 +323,14 @@ public class SystemInfoHandler extends RequestHandlerBase
|
||||||
{
|
{
|
||||||
SimpleOrderedMap<Object> info = new SimpleOrderedMap<>();
|
SimpleOrderedMap<Object> info = new SimpleOrderedMap<>();
|
||||||
|
|
||||||
if (cc.getAuthenticationPlugin() != null) info.add("authenticationPlugin", cc.getAuthenticationPlugin().getName());
|
if (cc != null) {
|
||||||
if (cc.getAuthorizationPlugin() != null) info.add("authorizationPlugin", cc.getAuthorizationPlugin().getClass().getName());
|
if (cc.getAuthenticationPlugin() != null) {
|
||||||
|
info.add("authenticationPlugin", cc.getAuthenticationPlugin().getName());
|
||||||
|
}
|
||||||
|
if (cc.getAuthorizationPlugin() != null) {
|
||||||
|
info.add("authorizationPlugin", cc.getAuthorizationPlugin().getClass().getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// User principal
|
// User principal
|
||||||
String username = null;
|
String username = null;
|
||||||
|
@ -333,7 +339,7 @@ public class SystemInfoHandler extends RequestHandlerBase
|
||||||
info.add("username", username);
|
info.add("username", username);
|
||||||
|
|
||||||
// Mapped roles for this principal
|
// Mapped roles for this principal
|
||||||
AuthorizationPlugin auth = cc.getAuthorizationPlugin();
|
AuthorizationPlugin auth = cc==null? null: cc.getAuthorizationPlugin();
|
||||||
if (auth != null) {
|
if (auth != null) {
|
||||||
RuleBasedAuthorizationPlugin rbap = (RuleBasedAuthorizationPlugin) auth;
|
RuleBasedAuthorizationPlugin rbap = (RuleBasedAuthorizationPlugin) auth;
|
||||||
Set<String> roles = rbap.getRoles(username);
|
Set<String> roles = rbap.getRoles(username);
|
||||||
|
|
Loading…
Reference in New Issue