#NEWLINE# def __init__( self , user ) : #NEWLINE# #INDENT# self . user = user #NEWLINE# conn = get_ldap_connection ( configuration . get ( 'ldap' , 'bind_user' ) , configuration . get ( 'ldap' , 'bind_password' ) ) #NEWLINE# try : #NEWLINE# #INDENT# self . superuser = group_contains_user ( user , configuration . get ( 'ldap' , 'basedn' ) , configuration . get ( 'ldap' , 'superuser_filter' ) , configuration . get ( 'ldap' , 'user_name_attr' ) , user . username ) #NEWLINE# #UNINDENT# except AirflowConfigException : #NEWLINE# #INDENT# self . superuser = True #NEWLINE# LOG . debug ( 'Missing configuration for superuser settings.  Skipping.' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . data_profiler = group_contains_user ( conn , configuration . get ( 'ldap' , 'basedn' ) , configuration . get ( 'ldap' , 'data_profiler_filter' ) , configuration . get ( 'ldap' , 'user_name_attr' ) , user . username ) #NEWLINE# #UNINDENT# except AirflowConfigException : #NEWLINE# #INDENT# self . data_profiler = True #NEWLINE# LOG . debug ( 'Missing configuration for dataprofiler settings. Skipping' )