file based auth
This commit is contained in:
@@ -4,7 +4,7 @@ import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { getHomeDir } from '@@/data-path';
|
||||
import { syncUserPiConfig } from '@@/api/server-settings/sync-user-pi-config';
|
||||
import { officerdb, Users } from 'officerdb';
|
||||
import { getUsers } from 'officerdb';
|
||||
|
||||
type WSData = { userId: number; email: string; username: string; role: string; sandboxed: boolean; sessionId?: string; cwd?: string; cols?: number; rows?: number };
|
||||
type ShellInfo = { command: string; args: string[]; name: string };
|
||||
@@ -269,7 +269,7 @@ const startHostSidecar = async () => {
|
||||
export const initTerminalSidecars = async () => {
|
||||
await startHostSidecar();
|
||||
ensureDockerImage();
|
||||
const users = await officerdb.select({ id: Users.id, email: Users.email, username: Users.username }).from(Users);
|
||||
const users = getUsers();
|
||||
for (const user of users) {
|
||||
const homeDir = getHomeDir(user.email);
|
||||
mkdirSync(dirname(homeDir), { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user