backend.globaleaks.handlers.admin.user

Module Contents

Functions

db_create_user(session, tid, request, language) Transaction for creating a new user
create_user(session, tid, request, language) Transaction for creating a new user
db_admin_update_user(session, tid, user_session, user_id, request, language) Transaction for updating an existing user
db_get_users(session, tid, role=None, language=None) Transaction for retrieving the list of users defined on a tenant
backend.globaleaks.handlers.admin.user.db_create_user(session, tid, request, language)[source]

Transaction for creating a new user

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

The serialized descriptor of the created object

backend.globaleaks.handlers.admin.user.create_user(session, tid, request, language)[source]

Transaction for creating a new user

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

The serialized descriptor of the created object

backend.globaleaks.handlers.admin.user.db_admin_update_user(session, tid, user_session, user_id, request, language)[source]

Transaction for updating an existing user

Parameters:
  • session – An ORM session
  • tid – A tenant ID
  • user_session – The current user session
  • user_id – The ID of the user to update
  • request – The request data
  • language – The language of the request
Returns:

The serialized descriptor of the updated object

backend.globaleaks.handlers.admin.user.db_get_users(session, tid, role=None, language=None)[source]

Transaction for retrieving the list of users defined on a tenant

Parameters:
  • session – An ORM session
  • tid – A tenant ID
  • role – The role of the users to be retriven
  • language – The language to be used during serialization
Returns:

A list of serialized descriptors of the users defined on the specified tenant

class backend.globaleaks.handlers.admin.user.UsersCollection[source]

Bases: globaleaks.handlers.base.BaseHandler

check_roles = admin[source]
cache_resource = True[source]
invalidate_cache = True[source]
get(self)[source]

Return all the users.

post(self)[source]

Create a new user

class backend.globaleaks.handlers.admin.user.UserInstance[source]

Bases: globaleaks.handlers.base.BaseHandler

check_roles = admin[source]
invalidate_cache = True[source]
put(self, user_id)[source]

Update the specified user.

delete(self, user_id)[source]

Delete the specified user.