backend.globaleaks.handlers.admin.submission_statuses

Module Contents

Functions

serialize_submission_substatus(substatus, language) Transaction to serialize a submission substatus
serialize_submission_status(session, status, language) Transaction to serialize a submission status
db_get_submission_statuses(session, tid, language) Transaction for fetching the submission statuses associated to a tenant
db_get_submission_status(session, tid, status_id, language) Transaction for fetching the submission status given its ID
db_update_status_model_from_request(model_obj, request, language) Populates the model from the request, as well as setting default values
db_create_submission_status(session, tid, request, language) Transaction for registering a submission status creation
db_update_submission_status(session, tid, status_id, request, language) Transaction for updating a submission status
db_update_substatus_model_from_request(model_obj, request, language) Populates the model from the request, as well as setting default values
db_update_submission_substatus(session, tid, status_id, substatus_id, request, language) Transaction for updating a submission substatus
db_create_submission_substatus(session, tid, status_id, request, language) Transaction for registering a submission substatus creation
order_status_elements(session, handler, req_args, *args, **kwargs) Sets the presentation order for status elements
order_substatus_elements(session, handler, req_args, *args, **kwargs) Sets presentation order for substatuses
backend.globaleaks.handlers.admin.submission_statuses.serialize_submission_substatus(substatus, language)[source]

Transaction to serialize a submission substatus

Parameters:
  • substatus – The status to be serialized
  • language – The language to be used in the serialization
Returns:

The serialized descriptor of the specified status

backend.globaleaks.handlers.admin.submission_statuses.serialize_submission_status(session, status, language)[source]

Transaction to serialize a submission status

Parameters:
  • session – An ORM session
  • status – The status to be serialized
  • language – The language to be used in the serialization
Returns:

The serialized descriptor of the specified status

backend.globaleaks.handlers.admin.submission_statuses.db_get_submission_statuses(session, tid, language)[source]

Transaction for fetching the submission statuses associated to a tenant

Parameters:
  • session – An ORM session
  • tid – A tenant ID
  • language – The language to be used in the serialization
Returns:

The list of descriptors for the submission statuses defined on the specified tenant

backend.globaleaks.handlers.admin.submission_statuses.db_get_submission_status(session, tid, status_id, language)[source]

Transaction for fetching the submission status given its ID

Parameters:
  • session – An ORM session
  • tid – A tenant ID
  • status_id – The ID of the submission status to be retriven
  • language – The language to be used in the serialization
Returns:

The serialized descriptor of the indicated submission status

backend.globaleaks.handlers.admin.submission_statuses.db_update_status_model_from_request(model_obj, request, language)[source]

Populates the model from the request, as well as setting default values

Parameters:
  • model_obj – The object model
  • request – The request data
  • language – The language of the request
backend.globaleaks.handlers.admin.submission_statuses.db_create_submission_status(session, tid, request, language)[source]

Transaction for registering a submission status creation

Parameters:
  • session – An ORM session
  • tid – The tenant ID
  • request – The request data
  • language – The language of the request
Returns:

The serialized descriptor of the created submission status

backend.globaleaks.handlers.admin.submission_statuses.db_update_submission_status(session, tid, status_id, request, language)[source]

Transaction for updating a submission status

Parameters:
  • session – An ORM session
  • tid – The tenant ID
  • status_id – The ID of the object to be updated
  • request – The request data
  • language – The language of the request
Returns:

The serialized descriptor of the updated object

backend.globaleaks.handlers.admin.submission_statuses.db_update_substatus_model_from_request(model_obj, request, language)[source]

Populates the model from the request, as well as setting default values

Parameters:
  • model_obj – The object model
  • request – The request data
  • language – The language of the request
backend.globaleaks.handlers.admin.submission_statuses.db_update_submission_substatus(session, tid, status_id, substatus_id, request, language)[source]

Transaction for updating a submission substatus

Parameters:
  • session – An ORM session
  • tid – The tenant ID
  • status_id – The ID of the status object to be updated
  • substatus_id – The ID of the substatus object to be updated
  • request – The request data
  • language – The language of the request
Returns:

The serialized descriptor of the updated object

backend.globaleaks.handlers.admin.submission_statuses.db_create_submission_substatus(session, tid, status_id, request, language)[source]

Transaction for registering a submission substatus creation

Parameters:
  • session – An ORM session
  • tid – The tenant ID
  • status_id – The ID of the parent status
  • request – The request data
  • language – The language of the request
Returns:

The serialized descriptor of the created submission status

backend.globaleaks.handlers.admin.submission_statuses.order_status_elements(session, handler, req_args, *args, **kwargs)[source]

Sets the presentation order for status elements

backend.globaleaks.handlers.admin.submission_statuses.order_substatus_elements(session, handler, req_args, *args, **kwargs)[source]

Sets presentation order for substatuses

class backend.globaleaks.handlers.admin.submission_statuses.SubmissionStatusCollection[source]

Bases: globaleaks.handlers.operation.OperationHandler

check_roles = admin[source]
invalidate_cache = True[source]
get(self)[source]
post(self)[source]
operation_descriptors(self)[source]
class backend.globaleaks.handlers.admin.submission_statuses.SubmissionStatusInstance[source]

Bases: globaleaks.handlers.base.BaseHandler

check_roles = admin[source]
invalidate_cache = True[source]
put(self, status_id)[source]
delete(self, status_id)[source]
class backend.globaleaks.handlers.admin.submission_statuses.SubmissionSubStatusCollection[source]

Bases: globaleaks.handlers.operation.OperationHandler

Manages substatuses for a given status

check_roles = admin[source]
invalidate_cache = True[source]
get(self, status_id)[source]
post(self, status_id)[source]
operation_descriptors(self)[source]
class backend.globaleaks.handlers.admin.submission_statuses.SubmissionSubStatusInstance[source]

Bases: globaleaks.handlers.base.BaseHandler

check_roles = admin[source]
invalidate_cache = True[source]
put(self, status_id, substatus_id)[source]
delete(self, status_id, substatus_id)[source]