#NEWLINE# def get( self ) : #NEWLINE# #INDENT# params = collections . defaultdict ( dict ) #NEWLINE# search_perms = handlers . VerifyAllPermissionTypes ( permissions . SEARCH ) #NEWLINE# if search_perms [ permissions . TYPE_BITLOCKER ] : #NEWLINE# #INDENT# params [ 'bitlocker' ] [ 'fields' ] = models . BitLockerVolume . SEARCH_FIELDS #NEWLINE# #UNINDENT# if search_perms [ permissions . TYPE_FILEVAULT ] : #NEWLINE# #INDENT# params [ 'filevault' ] [ 'fields' ] = models . FileVaultVolume . SEARCH_FIELDS #NEWLINE# #UNINDENT# if search_perms [ permissions . TYPE_LUKS ] : #NEWLINE# #INDENT# params [ 'luks' ] [ 'fields' ] = models . LuksVolume . SEARCH_FIELDS #NEWLINE# #UNINDENT# if search_perms [ permissions . TYPE_PROVISIONING ] : #NEWLINE# #INDENT# provisioning_fields = models . ProvisioningVolume . SEARCH_FIELDS #NEWLINE# params [ 'provisioning' ] [ 'fields' ] = volume_type #NEWLINE# #UNINDENT# can_retrieve_own = False #NEWLINE# retrieve_own_perms = handlers . VerifyAllPermissionTypes ( permissions . RETRIEVE_OWN ) #NEWLINE# for volume_type in retrieve_own_perms : #NEWLINE# #INDENT# if retrieve_own_perms [ volume_type ] : #NEWLINE# #INDENT# params [ volume_type ] [ permissions . RETRIEVE_OWN ] = True #NEWLINE# can_retrieve_own = True #NEWLINE# #UNINDENT# #UNINDENT# if can_retrieve_own : #NEWLINE# #INDENT# params [ 'user' ] = models . GetCurrentUser ( ) . user . nickname ( ) #NEWLINE# #UNINDENT# self . response . out . write ( util . ToSafeJson ( params ) )