File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed 
src/main/java/org/opensearch/security/privileges Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 4949import  org .opensearch .security .user .User ;
5050import  org .opensearch .tasks .Task ;
5151
52- import  static  org .opensearch .security .privileges .PrivilegesEvaluator .isClusterPerm ;
53- 
5452/** 
5553 * This class performs authorization on requests targeting system indices 
5654 * NOTE: 
@@ -304,8 +302,9 @@ private void evaluateSystemIndicesAccess(
304302                }
305303        }
306304
305+         // cluster actions will return true for requestedResolved.isLocalAll() 
307306        // the following section should only be run for index actions 
308-         if  (this .isSystemIndexEnabled  && user .isPluginUser () && !isClusterPerm ( action )) {
307+         if  (this .isSystemIndexEnabled  && user .isPluginUser () && !requestedResolved . isLocalAll ( )) {
309308            Set <String > matchingPluginIndices  = SystemIndexRegistry .matchesPluginSystemIndexPattern (
310309                user .getName ().replace ("plugin:" , "" ),
311310                requestedResolved .getAllIndices ()
@@ -316,9 +315,6 @@ private void evaluateSystemIndicesAccess(
316315                presponse .markComplete ();
317316                return ;
318317            } else  {
319-                 System .out .println ("Plugin user: "  + user .getName () + " requested indices: "  + requestedResolved .getAllIndices ());
320-                 System .out .println ("action: "  + action );
321-                 Thread .dumpStack ();
322318                Set <String > matchingSystemIndices  = SystemIndexRegistry .matchesSystemIndexPattern (requestedResolved .getAllIndices ());
323319                matchingSystemIndices .removeAll (matchingPluginIndices );
324320                // See if request matches other system indices not belong to the plugin 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments