mirror of https://github.com/apache/lucene.git
SOLR-15073: Fix ClassCastException in SystemInfoHandler.getSecurityInfo.
Same fix as the #2210 PR commit earlier but this time not extending SystemInfoHandlerTest and also not adding a static SystemInfoHandler.getSecurityInfo variant for test use.
This commit is contained in:
parent
64d445bbaa
commit
9d4811e02f
|
@ -364,6 +364,8 @@ Bug Fixes
|
||||||
|
|
||||||
* SOLR-15070: Suggester requests made with SolrJ can now use XMLResponseParser (Jason Gerlowski)
|
* SOLR-15070: Suggester requests made with SolrJ can now use XMLResponseParser (Jason Gerlowski)
|
||||||
|
|
||||||
|
* SOLR-15073: Fix ClassCastException in SystemInfoHandler.getSecurityInfo. (Nikolay Ivanov, Christine Poerschke)
|
||||||
|
|
||||||
* SOLR-15071: Fix ArrayIndexOutOfBoundsException in contrib/ltr SolrFeatureScorer.
|
* SOLR-15071: Fix ArrayIndexOutOfBoundsException in contrib/ltr SolrFeatureScorer.
|
||||||
(Florin Babes, Ovidiu Mihalcea, David Smiley, Christine Poerschke)
|
(Florin Babes, Ovidiu Mihalcea, David Smiley, Christine Poerschke)
|
||||||
|
|
||||||
|
|
|
@ -344,7 +344,7 @@ public class SystemInfoHandler extends RequestHandlerBase
|
||||||
// Mapped roles for this principal
|
// Mapped roles for this principal
|
||||||
@SuppressWarnings("resource")
|
@SuppressWarnings("resource")
|
||||||
AuthorizationPlugin auth = cc==null? null: cc.getAuthorizationPlugin();
|
AuthorizationPlugin auth = cc==null? null: cc.getAuthorizationPlugin();
|
||||||
if (auth != null) {
|
if (auth instanceof RuleBasedAuthorizationPluginBase) {
|
||||||
RuleBasedAuthorizationPluginBase rbap = (RuleBasedAuthorizationPluginBase) auth;
|
RuleBasedAuthorizationPluginBase rbap = (RuleBasedAuthorizationPluginBase) auth;
|
||||||
Set<String> roles = rbap.getUserRoles(req.getUserPrincipal());
|
Set<String> roles = rbap.getUserRoles(req.getUserPrincipal());
|
||||||
info.add("roles", roles);
|
info.add("roles", roles);
|
||||||
|
|
Loading…
Reference in New Issue