auth: drop the user environment provisioning
provisionUserEnvironment seeded a managed home under DATA_PATH/<email> — shell configs from a template dir, plus a generated CLAUDE.md and settings.json — and bootstrap called it fire-and-forget when the owner account was created. It is outdated: the managed home is not where anything runs. Task runs, terminals and chats all execute in getOwnerHomeDir (the real login home, HOME_DIR), not the getHomeDir tree this was populating. Removed the function, its four template files, and the call in bootstrap. No setup script referenced it — checked all of scripts/*.sh — and bootstrap was its only caller anywhere in the tree. getHomeDir and toShellUsername stay in data-path.ts: pipeline-executor and pipeline-job-manager still use them. This leaves src/servers/generate-container-context.ts with zero consumers, since provision was the only thing importing it. Left in place rather than deleted in the same commit — it is 173 lines that build a CLAUDE.md and a settings.json for an agent, which is plausibly wanted somewhere else, and that is a call for the owner rather than a side effect of this cleanup. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import argon2 from 'argon2';
|
||||
import * as errors from '@@/custom-errors';
|
||||
import { validatePassword } from './validate-password';
|
||||
import { validateUsername } from './validate-username';
|
||||
import { provisionUserEnvironment } from '../users/provision';
|
||||
|
||||
// Single-step bootstrap for the one account Officer supports: the server owner is created directly as
|
||||
// active, with no email-verification round-trip. Gated to an empty user table.
|
||||
@@ -38,12 +37,5 @@ export const bootstrapHandler: Handler = async function (ctx) {
|
||||
status: 'Active',
|
||||
});
|
||||
|
||||
// Provision the super admin's environment (DATA_PATH/<email> + configs) on creation. This is the only
|
||||
// account-creation flow for a single-user platform, and nothing else provisions the first user.
|
||||
// Fire-and-forget, mirroring verifyHandler.
|
||||
provisionUserEnvironment(user.email, user.username ?? validUsername).catch((err) => {
|
||||
console.error('[bootstrap] failed to provision super admin environment:', err);
|
||||
});
|
||||
|
||||
return ctx.json({ ok: true });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user