mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 02:42:38 +10:00
Compare commits
3 Commits
commentedi
...
c6bca6a602
| Author | SHA1 | Date | |
|---|---|---|---|
| c6bca6a602 | |||
| 55d1a2c932 | |||
| bc3cb2d63f |
@ -15,7 +15,7 @@ export default function EnforceSso() {
|
||||
<Text size="md">{t("Enforce SSO")}</Text>
|
||||
<Text size="sm" c="dimmed">
|
||||
{t(
|
||||
"Once enforced, members will not able to login with email and password.",
|
||||
"Once enforced, members will not be able to login with email and password.",
|
||||
)}
|
||||
</Text>
|
||||
</div>
|
||||
|
||||
@ -387,14 +387,14 @@ export class WorkspaceService {
|
||||
.replace(/[^a-z0-9]/g, '')
|
||||
.substring(0, 20);
|
||||
// Ensure we leave room for a random suffix.
|
||||
const maxSuffixLength = 3;
|
||||
const maxSuffixLength = 6;
|
||||
|
||||
if (subdomain.length < 4) {
|
||||
subdomain = `${subdomain}-${generateRandomSuffix(maxSuffixLength)}`;
|
||||
}
|
||||
|
||||
if (DISALLOWED_HOSTNAMES.includes(subdomain)) {
|
||||
subdomain = `myworkspace-${generateRandomSuffix(maxSuffixLength)}`;
|
||||
subdomain = `workspace-${generateRandomSuffix(maxSuffixLength)}`;
|
||||
}
|
||||
|
||||
let uniqueHostname = subdomain;
|
||||
|
||||
@ -70,7 +70,7 @@ export class UserTokenRepo {
|
||||
.where('userId', '=', userId)
|
||||
.where('workspaceId', '=', workspaceId)
|
||||
.where('type', '=', tokenType)
|
||||
.orderBy('expiresAt desc')
|
||||
.orderBy('expiresAt', 'desc')
|
||||
.execute();
|
||||
}
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ export class WorkspaceRepo {
|
||||
return await this.db
|
||||
.selectFrom('workspaces')
|
||||
.selectAll()
|
||||
.orderBy('createdAt asc')
|
||||
.orderBy('createdAt', 'asc')
|
||||
.limit(1)
|
||||
.executeTakeFirst();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user