#NEWLINE# def _get_user_tenants_roles_by_api( self , tenant_list , user_list ) : #NEWLINE# #INDENT# user_tenants_roles = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for user in user_list : #NEWLINE# #INDENT# user_tenants_roles [ user . name . lower ( ) ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for tenant in user_list : #NEWLINE# #INDENT# roles = [ ] #NEWLINE# for role in self . roles_for_user ( user . id , tenant . id ) : #NEWLINE# #INDENT# roles . append ( { #NEWLINE# #INDENT# 'role' : { #NEWLINE# #INDENT# 'name' : role . name , #NEWLINE# 'id' : role . id , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# user_tenants_roles [ user . name . lower ( ) ] [ tenant . name . lower ( ) ] = roles #NEWLINE# #UNINDENT# #UNINDENT# return user_tenants_roles