backend.globaleaks.handlers.admin.file

Module Contents

Functions

get_files(session, tid) Transaction to retrieve the list of files configured on a tenant
db_add_file(session, tid, file_id, name, data) Transaction to register a file on a tenant
db_get_file(session, tid, file_id) Transaction thecontent of the file identified by the specified id
backend.globaleaks.handlers.admin.file.get_files(session, tid)[source]

Transaction to retrieve the list of files configured on a tenant

Parameters:
  • session – An ORM session
  • tid – The tenant ID on which perform the lookup
Returns:

A list of descriptors of the configured files

backend.globaleaks.handlers.admin.file.db_add_file(session, tid, file_id, name, data)[source]

Transaction to register a file on a tenant

Parameters:
  • session – An ORM session
  • tid – The tenant ID
  • file_id – The ID of the file to be added
  • name – The file name
  • data – The file content
backend.globaleaks.handlers.admin.file.db_get_file(session, tid, file_id)[source]

Transaction thecontent of the file identified by the specified id

Parameters:
  • session – An ORM session
  • tid – A tenant ID
  • file_id – A file ID
Returns:

The content of the file

class backend.globaleaks.handlers.admin.file.FileInstance[source]

Bases: globaleaks.handlers.base.BaseHandler

check_roles = user[source]
invalidate_cache = True[source]
upload_handler = True[source]
permission_check(self, id)[source]
post(self, id)[source]
delete(self, id)[source]
class backend.globaleaks.handlers.admin.file.FileCollection[source]

Bases: globaleaks.handlers.base.BaseHandler

check_roles = user[source]
get(self)[source]

Return the list of files and their info