Skip to content

feat(app): add config.allowMultiOrgCreation to expose ALLOW_MULTI_ORG_CREATION - #228

Open
naresh4dev wants to merge 1 commit into
mainfrom
feat/allow-multi-org-creation
Open

naresh4dev wants to merge 1 commit into
mainfrom
feat/allow-multi-org-creation

Conversation

@naresh4dev

Copy link
Copy Markdown
Member

Description

albus#2799 added an opt-in ALLOW_MULTI_ORG_CREATION backend flag that lets users who are already an owner/admin of an organization create additional ones. The chart had no way to set it, so air-gapped installs had to fall back to backend.deployment.extraEnv.

This exposes it as config.allowMultiOrgCreation.

Motivation and Context

In an air-gapped deployment the first organization is self-provisioned over HTTP (POST /v2/auth/login → POST /v1/organisation) — there are no seeds or migrations that insert an initial org. Once a user owns an org, the "You are already part of an organisation and cannot create a new one" guard blocks any further orgs. ALLOW_MULTI_ORG_CREATION is the supported escape hatch for operators who need multiple orgs on one install, and it should be a first-class chart value rather than a raw env override.

Changes

  • values.yaml — new config.allowMultiOrgCreation: false (default preserves current behaviour)
  • templates/backend/deployment.yaml — rendered as an else if branch of the existing disableOrgCreation block, so DISABLE_ORG_CREATION keeps precedence
  • docs/configuration.md — new "Organization Creation" section documenting both flags and their interaction
  • config-samples/openshift.yaml — added the key with an explanatory comment
  • Chart.yaml — version 1.7.6 → 1.7.7

Why else if and not a second independent block

The backend already treats these as mutually exclusive:

isMultiOrgCreationEnabled:
    isPrivateDeployment &&
    Environment.ALLOW_MULTI_ORG_CREATION === 'ON' &&
    Environment.DISABLE_ORG_CREATION !== 'ON',

Rendering ALLOW_MULTI_ORG_CREATION=ON alongside DISABLE_ORG_CREATION=ON would be a no-op that reads as if multi-org were active. The else if makes the precedence explicit in the manifest.

How Has This Been Tested?

helm lint passes. helm template verified for all four flag combinations:

disableOrgCreation allowMultiOrgCreation Rendered env
false false neither (default)
false true ALLOW_MULTI_ORG_CREATION=ON
true false DISABLE_ORG_CREATION=ON
true true DISABLE_ORG_CREATION=ON only

Full chart render (33 resources) and the openshift.yaml sample both render cleanly.

  • Others (please specify): helm lint + helm template matrix across all flag combinations

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Change Size

  • Small (less than 50 lines changed)

Checklist

Code Quality

  • My code follows the code style and guidelines of this project
  • This PR is free of merge conflicts and is updated with the main branch
  • There are no unwanted console logs, commented code, or TODO statements
  • I have performed a self-review of my own code

Documentation

  • My changes require updates to the documentation
  • I have updated the documentation accordingly

Backward Compatibility and Dependencies

  • My changes ensure 100% backward compatibility
  • This PR does not have dependencies on other pending PRs

Defaults to false, so existing installs render byte-identical manifests. Requires an appVersion that includes albus#2799; on older backends the env var is simply ignored.

Deployment Notes

Operators who previously set ALLOW_MULTI_ORG_CREATION via backend.deployment.extraEnv can move it to config.allowMultiOrgCreation. Leaving it in extraEnv continues to work.

albus PR #2799 added an opt-in ALLOW_MULTI_ORG_CREATION flag that lets
users who are already an owner/admin of an organization create additional
ones. The chart had no way to set it, so air-gapped installs had to fall
back to backend.deployment.extraEnv.

Expose it as config.allowMultiOrgCreation, rendered as an else-if branch
of the existing disableOrgCreation block so DISABLE_ORG_CREATION keeps
precedence. This mirrors the backend, where isMultiOrgCreationEnabled
requires DISABLE_ORG_CREATION !== 'ON'.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 17:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The OpenShift sample’s pinned backend version ignores the newly documented environment variable.

1 open finding
What changed in this PR

Exposes multi-organization creation as a first-class Helm configuration option while preserving existing defaults and disable precedence.

Changes:

  • Adds and renders config.allowMultiOrgCreation.
  • Documents flag behavior and precedence.
  • Updates the chart version and OpenShift sample.
File Description
values.yaml Adds the disabled-by-default value.
templates/​backend/​deployment.yaml Renders the backend environment variable.
docs/​configuration.md Documents organization creation controls.
config-samples/​openshift.yaml Adds the option, but pins an incompatible older backend.
Chart.yaml Bumps the chart patch version.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

config:
jwtPrivateKey: "" # Required: set a strong secret for signing the frontend JWT tokens, or provide it via config.existingSecretName
disableOrgCreation: false # Set to true to disable organization creation post installation and first time login
allowMultiOrgCreation: false # Set to true to let org owners/admins create additional organizations. Ignored when disableOrgCreation is true

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants