mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) show any error when creating initial team site with GRIST_SINGLE_ORG
Summary: Also clarifies that only lowercase letters are accepted. Test Plan: manual Reviewers: jarek Reviewed By: jarek Subscribers: jarek Differential Revision: https://phab.getgrist.com/D3647
This commit is contained in:
@@ -41,7 +41,7 @@ const BLACKLISTED_SUBDOMAINS = new Set([
|
||||
export function checkSubdomainValidity(subdomain: string): void {
|
||||
// stick with limited alphanumeric subdomains.
|
||||
if (!(/^[a-z0-9][-a-z0-9]*$/.test(subdomain))) {
|
||||
throw new Error('Domain must include letters, numbers, and dashes only.');
|
||||
throw new Error('Domain must include lower-case letters, numbers, and dashes only.');
|
||||
}
|
||||
// 'docs-*' is reserved for personal orgs.
|
||||
if (subdomain.startsWith('docs-')) { throw new Error('Domain cannot use reserved prefix "docs-".'); }
|
||||
|
||||
Reference in New Issue
Block a user