Skip to content

Add configuration option to disable organization creation#714

Open
refoo0 wants to merge 2 commits intomainfrom
add-config-option-to-disable-org-creation
Open

Add configuration option to disable organization creation#714
refoo0 wants to merge 2 commits intomainfrom
add-config-option-to-disable-org-creation

Conversation

@refoo0
Copy link
Copy Markdown
Member

@refoo0 refoo0 commented May 6, 2026

No description provided.

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an instance-level “single organization mode” flag to the web app so the UI can hide/redirect away from organization creation when the instance is configured to disallow it.

Changes:

  • Introduces InstanceSettings API type and a useInstanceSettings hook that fetches /instance-settings/.
  • Hides “Create Organization” from the organization dropdown and root header when singleOrganizationMode is enabled.
  • Redirects the /setup page to /join when singleOrganizationMode is enabled.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/types/api/api.ts Adds InstanceSettings type with singleOrganizationMode.
src/hooks/useInstanceSettings.ts New hook that fetches instance settings from /instance-settings/.
src/components/OrganizationDropDown.tsx Conditionally hides “Create Organization” based on instance settings.
src/components/common/RootHeader.tsx Conditionally removes “Create Organization” from the header menu.
src/app/(loading-group)/setup/page.tsx Redirects away from setup when single-org mode is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/hooks/useInstanceSettings.ts Outdated
Comment thread src/hooks/useInstanceSettings.ts Outdated
Comment thread src/hooks/useInstanceSettings.ts Outdated
Comment thread src/components/OrganizationDropDown.tsx
Comment thread src/components/common/RootHeader.tsx
Comment thread src/app/(loading-group)/setup/page.tsx
Signed-off-by: rafi <refaei.shikho@hotmail.com>
@refoo0 refoo0 marked this pull request as ready for review May 6, 2026 11:28
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