#NEWLINE# def check_view_permissions( self ) : #NEWLINE# #INDENT# '\n        Returns True if the user has required permissions.\n        ' #NEWLINE# if ( self . action == 'retrieve' ) : #NEWLINE# #INDENT# result = self . get_access_permissions ( ) . can_retrieve ( self . request . user ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result = ( ( self . action in ( 'metadata' , 'list' , 'create' ) ) and self . request . user . is_authenticated ( ) and self . request . user . has_perm ( 'core.can_use_chat' ) ) #NEWLINE# #UNINDENT# return result