File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ pub enum SupersetConfigOptions {
8888    AuthLdapTlsCacertfile , 
8989    CustomSecurityManager , 
9090    StackableOpaEndpoint , 
91-     OpaPackageName , 
91+     StackableOpaPackage , 
9292} 
9393
9494impl  SupersetConfigOptions  { 
@@ -138,7 +138,7 @@ impl FlaskAppConfigOptions for SupersetConfigOptions {
138138            SupersetConfigOptions :: AuthLdapTlsCacertfile  => PythonType :: StringLiteral , 
139139            SupersetConfigOptions :: CustomSecurityManager  => PythonType :: StringLiteral , 
140140            SupersetConfigOptions :: StackableOpaEndpoint  => PythonType :: StringLiteral , 
141-             SupersetConfigOptions :: OpaPackageName  => PythonType :: StringLiteral , 
141+             SupersetConfigOptions :: StackableOpaPackage  => PythonType :: StringLiteral , 
142142            // TODO: Set new options for OpaSecurityManager like: 
143143        } 
144144    } 
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ pub const PYTHON_IMPORTS: &[&str] = &[
3535    "from log_config import StackableLoggingConfigurator" , 
3636    ] ; 
3737
38- // TODO: Eihter use or remove this 
3938pub  const  OPA_IMPORTS :  & [ & str ]  =
4039    & [ "from superset.security.manager import OpaSupersetSecurityManager" ] ; 
4140
Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ fn build_rolegroup_config_map(
559559    vector_aggregator_address :  Option < & str > , 
560560)  -> Result < ConfigMap ,  Error >  { 
561561    let  mut  config_properties = BTreeMap :: new ( ) ; 
562-     let  imports = PYTHON_IMPORTS ; 
562+     let  mut   imports = PYTHON_IMPORTS . to_vec ( ) ; 
563563    // TODO: this is true per default for versions 3.0.0 and up. 
564564    //    We deactivate it here to keep existing functionality. 
565565    //    However this is a security issue and should be configured properly 
@@ -577,7 +577,7 @@ fn build_rolegroup_config_map(
577577        } 
578578        // If opa role mapping is configured, insert CustomOpaSecurityManager import 
579579        for  opa_import in  OPA_IMPORTS  { 
580-             imports. to_vec ( ) . push ( & opa_import) ; 
580+             imports. push ( & opa_import) ; 
581581        } 
582582    } 
583583
@@ -604,7 +604,7 @@ fn build_rolegroup_config_map(
604604    flask_app_config_writer:: write :: < SupersetConfigOptions ,  _ ,  _ > ( 
605605        & mut  config_file, 
606606        config_properties. iter ( ) , 
607-         imports, 
607+         & imports, 
608608    ) 
609609    . with_context ( |_| BuildRoleGroupConfigFileSnafu  { 
610610        rolegroup :  rolegroup. clone ( ) , 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments