Public | Automated Build

Last pushed: 4 months ago
Short Description
Docker image for BDR-Registry.
Full Description

BDR Organisations Registry

bdr-registry_ is a registry of company contacts (implemented as a
Django application) for the reporting process which is handled by the
BDR Zope_ application. Reporters from organisations can self-register
and then manage a list of contacts for their company. BDR helpdesk
can manage accounts and passwords and download CSV reports of

Base docker image: hub.docker.com_

.. _bdr-registry:
.. _BDR Zope:


Company reporters

Starting from the BDR homepage, reporters click on "Self-registration",
which takes them to a registration form on `bdr-registry`. The
information is saved in the `bdr-registry` database pending review by

After they receive an account, reporters can follow a link on the
reporting folder, which takes them to a page in `bdr-registry`, where
they can update the company's contact details.

All helpdesk actions are performed via the `bdr management pages`_.

.. _bdr management pages:

Helpdesk reviews self-registered organisations and creates LDAP accounts
and BDR reporting folders for them. These actions are performed via the
"action" menu after selecting one or more organisations. Optionally,
email notifications, containing the LDAP username and password, can be
sent to company contacts when the accounts are created, or at a
later time.

Helpdesk can download CSV reports of `companies`_ and `contact

.. _companies:
.. _contact persons:


Authentication is performed using the Django authentication system
against the same LDAP server as the `BDR Zope` application.

User permissions for `bdr-registry` are configured via the `bdr management`_.
The `helpdesk` group grants permission to can edit/delete
any company, create/update LDAP accounts, reset passwords, and
create reporting folders in the `BDR Zope` application.

.. _bdr management:

Company accounts have no special roles configured in
`bdr-registry`; they can edit their own company's contact details
based on the user id. They are however granted owner rights on their
reporting folder in the `BDR Zope` application, so they can upload files
and follow the envelope workflow steps.

Integration with other services

bdr-registry creates/updates LDAP accounts using a privileged user,
configured using the LDAP_EDIT_* settings.

The BDR Zope application exposes an API to allow bdr-registry to
create folders for newly registered organisations. The endpoint is
configured using the BDR_API_* settings. The API is deployed in Zope
as a Script (Python) (source code at
zope_api/; the BDR_API_AUTH user
is granted Manager role on the entire BDR Zope application so it can
create reporting folders.

WebQ_ calls a bdr-registry API to fetch company details. This
API is protected using access tokens configured in the management interface.

When a user visits bdr-registry coming from the BDR Zope
application, and the user is not yet authenticated in bdr-registry,
the HTTP Basic access authentication information is used to log them
into bdr-registry.

.. _WebQ:

Development and deployment

Install dependencies. It's a good idea to run this in a virtualenv_::

$ pip install -r requirements-dev.txt

Create a local settings file by copying and modifying

Run the testsuite::

$ ./ test bdr_registry

Start the server locally::

$ DJANGO_SETTINGS_MODULE=localsettings ./ runserver

Run a management command, e.g. database initialization and migrations::

$ DJANGO_SETTINGS_MODULE=localsettings ./ syncdb
$ DJANGO_SETTINGS_MODULE=localsettings ./ migrate

The command to run the server in production::

$ DJANGO_SETTINGS_MODULE=localsettings ./ run_gunicorn

To resend emails failed to send initially, use::

$ ./ resend_failed

.. _virtualenv:

Docker Pull Command
Source Repository