backend.globaleaks.handlers.admin.node

Module Contents

Classes

NodeInstance

Functions

db_update_enabled_languages(session, tid, languages_enabled, default_language) Transaction for updating the enabled languages for a tenant
db_admin_serialize_node(session, tid, language, config_node=’admin_node’) Transaction for fetching the node configuration as admin
db_update_node(session, tid, user_session, request, language) Transaction to update the node configuration
backend.globaleaks.handlers.admin.node.db_update_enabled_languages(session, tid, languages_enabled, default_language)[source]

Transaction for updating the enabled languages for a tenant

Parameters:
  • session – An ORM session
  • tid – A tenant id
  • languages_enabled – The list of enabled languages
  • default_language – The language to be set as default
backend.globaleaks.handlers.admin.node.db_admin_serialize_node(session, tid, language, config_node='admin_node')[source]

Transaction for fetching the node configuration as admin

Parameters:
  • session – An ORM session
  • tid – A tenant ID
  • language – The language to be used on serialization
  • config_node – The set of variables to be serialized
Returns:

Return the serialized configuration for the specified tenant

backend.globaleaks.handlers.admin.node.db_update_node(session, tid, user_session, request, language)[source]

Transaction to update the node configuration

Parameters:
  • session – An ORM session
  • tid – A tenant ID
  • user_session – The current user session
  • request – The request data
  • language – the language in which to localize data
Returns:

Return the serialized configuration for the specified tenant

class backend.globaleaks.handlers.admin.node.NodeInstance[source]

Bases: globaleaks.handlers.base.BaseHandler

check_roles = user[source]
cache_resource = True[source]
invalidate_cache = True[source]
determine_allow_config_filter(self)[source]

Determines what filters are allowed, else throws invalid authentication

get(self)[source]

Get the node infos.

put(self)[source]

Update the node infos.