#NEWLINE# def get_perms( self ) : #NEWLINE# #INDENT# perms = [ ] #NEWLINE# for role in g . user . roles : #NEWLINE# #INDENT# for perm_view in role . permissions : #NEWLINE# #INDENT# if ( perm_view . permission . name == 'datasource_access' ) : #NEWLINE# #INDENT# perms . append ( perm_view . view_menu . name ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return self