Skip to content

Add option to disable business registry check in the portal #166

Description

@vohmar

Background

The registrant portal integrates with the Estonian business registry (äriregister) to
show users the companies they represent and the associated domains. When the business
registry experiences known outages or data quality issues, this integration currently
has no way to be disabled without a code deployment.

Problem

There is no configuration option to disable the business registry check (Companies page
/ /api/companies endpoint) when administrators are aware of problems with that data
source. This forces users to experience degraded or broken portal behaviour during known
business registry incidents.

Proposed Solution

Add an environment variable (e.g. DISABLE_BUSINESS_REGISTRY=true) to the portal
configuration that:

  1. Disables the /api/companies endpoint (returns an empty list or a service-unavailable
    response) without affecting any other portal functionality.
  2. Optionally renders a configurable maintenance/notice message on the Companies page
    (/companies) so users understand why company data is temporarily unavailable.
  3. Is documented in .env.example with a comment explaining when and how to use it.

Acceptance Criteria

  • New environment variable DISABLE_BUSINESS_REGISTRY (default: false) controls
    whether the business registry integration is active.
  • When disabled, the Companies page shows a user-friendly notice instead of an error
    or empty state.
  • Domain listing and all other portal features remain fully functional when the
    business registry check is disabled.
  • The variable is documented in .env.example.

Relevant Code

  • server/routes/apiRoute.jsgetCompanies
  • src/pages/CompaniesPage/CompaniesPage.jsx
  • src/redux/reducers/companies.js
  • .env.example

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions