#NEWLINE# def get_queryset( self ) : #NEWLINE# #INDENT# if ( self . request . method == 'GET' ) : #NEWLINE# #INDENT# documents = DocumentCheckout . objects . checked_out_documents ( ) #NEWLINE# try : #NEWLINE# #INDENT# Permission . check_permissions ( self . request . user , ( permission_document_view , ) ) #NEWLINE# #UNINDENT# except PermissionDenied : #NEWLINE# #INDENT# filtered_documents = AccessControlList . objects . filter_by_access ( ( permission_document_view , ) , self . request . user , self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# filtered_documents = documents #NEWLINE# #UNINDENT# return DocumentCheckout . objects . filter ( document__pk__in = filtered_documents . values_list ( 'pk' , flat = True ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . request . method == 'DELETE' ) : #NEWLINE# #INDENT# return DocumentCheckout . objects . all ( )