mirror of
				https://salsa.debian.org/freeipa-team/freeipa.git
				synced 2025-02-25 18:55:28 -06:00 
			
		
		
		
	Propagate environment when it is required.
https://fedorahosted.org/freeipa/ticket/1549 https://fedorahosted.org/freeipa/ticket/1550
This commit is contained in:
		
				
					committed by
					
						 Rob Crittenden
						Rob Crittenden
					
				
			
			
				
	
			
			
			
						parent
						
							76a56d0741
						
					
				
				
					commit
					dca6cf1666
				
			| @@ -344,6 +344,13 @@ class HasParam(Plugin): | ||||
|         for spec in get(): | ||||
|             param = create_param(spec) | ||||
|             if env is None or param.use_in_context(env): | ||||
|                 if env is not None and not hasattr(param, 'env'): | ||||
|                     # Force specified environment. The way it is done is violation of ReadOnly promise. | ||||
|                     # Unfortunately, all alternatives are worse from both performance and code complexity | ||||
|                     # points of view. See following threads on freeipa-devel@ for references: | ||||
|                     # https://www.redhat.com/archives/freeipa-devel/2011-August/msg00000.html | ||||
|                     # https://www.redhat.com/archives/freeipa-devel/2011-August/msg00011.html | ||||
|                     object.__setattr__(param, 'env', env) | ||||
|                 yield param | ||||
|  | ||||
|     def _create_param_namespace(self, name, env=None): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user