remove the dead multi-user surface
Officer is single-user: the server owner is the only account, created once by /auth/bootstrap. Everything that existed to serve additional users was unreachable, so it is gone rather than left looking like it does something. Accounts: drop the invite / resend-invite / delete / list-users routes and the Users settings screen, the inert /auth/signup handler, and the account verification chain it fed (verify, resend-verification, VerifyScreen, the UserInvite + VerifyAdmin + VerifyRegistration templates). /auth/verify-token survives for password resets only, and now requires a reset-password token rather than accepting any signed JWT. Roles: drop the users.role column and the four-value USER_ROLES enum. The permissions table granted every role identical methods, and every role === 'Super Admin' check was permanently true. The JWT no longer carries a role claim. Sandbox: remove sidecar/sandbox.ts and its five call sites. bwrap was selected only for non-Super-Admin users, so it never ran. It was also not a usable agent jail as written — --share-net, the project root (with .env) bound read-only, and runuser dropping to the server's own uid. Rebuilding it for agent containment would be a different construction, and git history keeps this one. getHomeDir keeps its DATA_PATH meaning; the new getOwnerHomeDir resolves the owner's real login home, which is what terminals, chats and task runs use. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
92de996412
commit
044aacf4d5
@@ -1,33 +0,0 @@
|
||||
import { Body, Html, Head, Container, Img, Tailwind } from '@react-email/components';
|
||||
import { Text, Button } from '@react-email/components';
|
||||
|
||||
type EmailProps = {
|
||||
invitedBy: string;
|
||||
url: string;
|
||||
};
|
||||
|
||||
const Email = ({ invitedBy, url }: EmailProps) => {
|
||||
return (
|
||||
<Html>
|
||||
<Head />
|
||||
<Tailwind>
|
||||
<Body className="mx-auto my-12 bg-white font-sans">
|
||||
<Container className="rounded-lg bg-white p-8 shadow-lg">
|
||||
<Img
|
||||
className="mx-auto block"
|
||||
src="/og-image.jpg"
|
||||
width="480"
|
||||
alt="officer.dev"
|
||||
/>
|
||||
<Text className="pt-4 text-2xl">You're invited to officer.dev</Text>
|
||||
<Text>You have been invited by {invitedBy || '<invitedBy>'} to join officer.dev.</Text>
|
||||
<Text>Click the button below to set up your account.</Text>
|
||||
<Button href={url || 'https://example.com'}>Accept Invitation</Button>
|
||||
</Container>
|
||||
</Body>
|
||||
</Tailwind>
|
||||
</Html>
|
||||
);
|
||||
};
|
||||
|
||||
export default Email;
|
||||
@@ -1,21 +0,0 @@
|
||||
import Layout from './layouts/MainLayout.jsx';
|
||||
import { Container } from '@react-email/components';
|
||||
import { Text, Button } from '@react-email/components';
|
||||
|
||||
type EmailProps = {
|
||||
name: string;
|
||||
url: string;
|
||||
};
|
||||
const Email = ({ name, url }: EmailProps) => {
|
||||
return (
|
||||
<Layout>
|
||||
<Container>
|
||||
<Text className="pt-4 text-2xl">Welcome, {name || 'there'}</Text>
|
||||
<Text className="text-xs">You can ignore this email if you didn't signup for our site.</Text>
|
||||
<Button href={url || 'https://example.com'}>Click here to set up your admin account</Button>
|
||||
</Container>
|
||||
</Layout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Email;
|
||||
@@ -1,21 +0,0 @@
|
||||
import Layout from './layouts/MainLayout.jsx';
|
||||
import { Container } from '@react-email/components';
|
||||
import { Text, Button } from '@react-email/components';
|
||||
|
||||
type EmailProps = {
|
||||
name: string;
|
||||
url: string;
|
||||
};
|
||||
const Email = ({ name, url }: EmailProps) => {
|
||||
return (
|
||||
<Layout>
|
||||
<Container>
|
||||
<Text className="pt-4 text-2xl">Welcome, {name || 'there'}</Text>
|
||||
<Text className="text-xs">You can ignore this email if you didn't signup for our site.</Text>
|
||||
<Button href={url || 'https://example.com'}>Click here to Confirm your Registration</Button>
|
||||
</Container>
|
||||
</Layout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Email;
|
||||
Reference in New Issue
Block a user