MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / isSignupAllowed

Method isSignupAllowed

lib/config.ts:123–136  ·  view source on GitHub ↗
({ viaSingleSignOn = false }: { viaSingleSignOn?: boolean } = {})

Source from the content-addressed store, hash-verified

121 }
122
123 static async isSignupAllowed({ viaSingleSignOn = false }: { viaSingleSignOn?: boolean } = {}): Promise<boolean> {
124 await this.loadConfig();
125
126 const areSignupsAllowed = viaSingleSignOn && !this.config.auth.allowSignups
127 ? this.config.auth.allowSignupsViaSingleSignOn
128 : this.config.auth.allowSignups;
129 const areThereAdmins = await UserModel.isThereAnAdmin();
130
131 if (areSignupsAllowed || !areThereAdmins) {
132 return true;
133 }
134
135 return false;
136 }
137
138 static async isAppEnabled(app: OptionalApp): Promise<boolean> {
139 await this.loadConfig();

Callers 2

postFunction · 0.80

Calls 2

loadConfigMethod · 0.95
isThereAnAdminMethod · 0.80

Tested by

no test coverage detected