dcb33e4 Optimize user-add by caching ldap2.has_upg()

Authored and Committed by cheimes 4 years ago
    Optimize user-add by caching ldap2.has_upg()
    
    The method has_upg returns if user private groups are enabled or
    disabled. has_upg() is called three times by user-add. The setting is
    now cached on the request local variable context to speed up batch
    processing of user imports.
    
    context is cleared after every request.
    
    Related: https://pagure.io/freeipa/issue/8134
    Signed-off-by: Christian Heimes <cheimes@redhat.com>
    Reviewed-By: Rob Crittenden <rcritten@redhat.com>
    
        
file modified
+8 -1