This is an automated email from the ASF dual-hosted git repository.

dineshkumar pushed a commit to branch ranger-2.6
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit 2d0e1edd1c3895345d842a2320536e87f9ee438a
Author: Sanket Shelar <[email protected]>
AuthorDate: Tue Dec 31 15:50:32 2024 +0530

    RANGER-4453: Exception while calling solr api when ranger authorisation is 
disabled for solr
    
    Signed-off-by: Dineshkumar Yadav <[email protected]>
---
 .../ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
 
b/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
index 40bc453ff..6ac7cbc2b 100644
--- 
a/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
+++ 
b/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
@@ -410,9 +410,9 @@ public class RangerSolrAuthorizer extends SearchComponent 
implements Authorizati
 
        @Override
        public void prepare(ResponseBuilder rb) throws IOException {
-               if (!enabled) {
+               if (solrPlugin == null || !enabled) {
                        if (logger.isDebugEnabled()) {
-                               logger.debug("Solr Document level Authorization 
is not enabled!");
+                               logger.debug("Solr Ranger Authorization or Solr 
Document level Authorization is not enabled!");
                        }
                        return;
                }

Reply via email to