mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-24 03:05:43 +02:00
- Add setupTokens database table with proper schema - Implement setup token generation on first server startup - Add token validation endpoint and modify admin creation - Update initial setup page to require setup token - Add migration scripts for both SQLite and PostgreSQL - Add internationalization support for setup token fields - Implement proper error handling and logging - Add CLI command for resetting user security keys This prevents unauthorized access during initial server setup by requiring a token that is generated and displayed in the server console.
11 lines
509 B
TypeScript
11 lines
509 B
TypeScript
import { ensureActions } from "./ensureActions";
|
|
import { copyInConfig } from "./copyInConfig";
|
|
import { clearStaleData } from "./clearStaleData";
|
|
import { ensureSetupToken } from "./ensureSetupToken";
|
|
|
|
export async function runSetupFunctions() {
|
|
await copyInConfig(); // copy in the config to the db as needed
|
|
await ensureActions(); // make sure all of the actions are in the db and the roles
|
|
await clearStaleData();
|
|
await ensureSetupToken(); // ensure setup token exists for initial setup
|
|
}
|