#NEWLINE# def _has_view_access( self , user , permission_name , view_name ) : #NEWLINE# #INDENT# roles = user . roles #NEWLINE# for role in roles : #NEWLINE# #INDENT# permissions = role . permissions #NEWLINE# if permissions : #NEWLINE# #INDENT# for permission in permission_name : #NEWLINE# #INDENT# if ( ( view_name == permission . view_menu . name ) and ( permission_name == permission . permission . name ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return False