feat: v2.7.6 — edit users in one form, Settings → Account, display names, copy over plain HTTP
- Users page: one Edit user form (display name, email, role, active, a new or generated password, workspaces given or taken back, sign out everywhere), validated as a whole before anything is written (PATCH /api/users/:id, GET /api/users/:id); users.display_name/email added migration-safe. - Settings → Account for every signed-in user: profile, own password (the current one required, this login kept), sign out other devices (/api/me/account, /api/me/password, /api/me/sign-out-others; login cookie only, never a pane token). - Display names wherever a person is named (sidebar, workspace owner groups, Users page and audit log); owner_display_name / reader_display additive. - Users page: admins add and remove Claude/Codex pool accounts. - Folder browser: an admin with their own Linux account opens in their home; the "Server folder" tick opens the host's (never remembered). - AI Proxy: "Config 9router" beside Add profile when 9router is installed, opened on the dashboard's own host (GET /api/ai-proxies/9router). - Terminal: a tmux selection reaches the clipboard over plain HTTP too (writeClipboard's textarea fallback, focus handed back). - Chat: a file the session touched outside the workspace previews (GET /api/sessions/:id/file). - install-system: `!requiretty` only when visudo accepts it (sudo-rs on Ubuntu 25.10+ rejects the setting). - openapi.yaml regenerated; docs (API, SERVER-MODE, LANES) updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,14 +22,20 @@
|
||||
* `GET /:name` — a route that returned one profile in full would be the one
|
||||
* way an API key could leave this process.
|
||||
*
|
||||
* `GET /9router` only says whether a `9router` binary is on the server's PATH,
|
||||
* so the page can offer a link to its own config UI; it never runs it.
|
||||
*
|
||||
* @author Nguyễn Ngọc Trí Vĩ <vinnt@smartgift.vn>
|
||||
*/
|
||||
|
||||
const path = require("node:path");
|
||||
const express = require("express");
|
||||
|
||||
const proxies = require("../lib/ai-proxies");
|
||||
const { refreshProfileFiles, removeProfileFiles } = require("../lib/proxy-apply");
|
||||
const { sameOriginGuard } = require("../lib/same-origin");
|
||||
const { which } = require("../lib/ai-tools");
|
||||
const { shellPath } = require("../lib/shell-path");
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
@@ -74,6 +80,13 @@ router.get("/", (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
// GET /api/ai-proxies/9router — is 9router installed here? `{ installed }`.
|
||||
// A file lookup on PATH only; nothing is spawned.
|
||||
router.get("/9router", (_req, res) => {
|
||||
const pathStr = [shellPath(), process.env.PATH].filter(Boolean).join(path.delimiter);
|
||||
res.json({ installed: Boolean(which("9router", pathStr)) });
|
||||
});
|
||||
|
||||
// POST /api/ai-proxies — body: { label, baseUrl, apiKey?, model, models?,
|
||||
// behavesAs?, scope? }. `scope` is "shared" (an admin's default) or "personal"
|
||||
// (a member's only choice); local mode has no user and always writes shared.
|
||||
|
||||
Reference in New Issue
Block a user