#NEWLINE# def has_permission( self , request , view ) : #NEWLINE# #INDENT# required_permission = getattr ( view , 'mayan_view_permissions' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( request . method , None ) #NEWLINE# if required_permission : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# Permission . check_permissions ( required_permission . user , required_permission ) #NEWLINE# #UNINDENT# except PermissionDenied : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return True