From 7972efdbac0b5678e21c61cec243cfcc9afe46e1 Mon Sep 17 00:00:00 2001 From: Tim Ristau Date: Sat, 25 Oct 2025 20:48:33 -0400 Subject: [PATCH] Add vscode dir to gitignore, fix light mode css, add SU default perms --- .gitignore | 1 + public/api/users/index.ts | 15 ++++++++++++++- public/base.css | 2 +- public/signup_login_wall.html | 5 +++-- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index af268c2..b74bc5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ data/ .fsdb public/files/* +.vscode/* \ No newline at end of file diff --git a/public/api/users/index.ts b/public/api/users/index.ts index 0e8cb98..435a4ca 100644 --- a/public/api/users/index.ts +++ b/public/api/users/index.ts @@ -10,6 +10,7 @@ import * as CANNED_RESPONSES from '../../../utils/canned_responses.ts'; import * as bcrypt from '@da/bcrypt'; import { INVITE_CODE, INVITE_CODES } from '../../../models/invites.ts'; + // TODO: figure out a better solution for doling out permissions const DEFAULT_USER_PERMISSIONS: string[] = [ 'files.write.own', @@ -36,6 +37,14 @@ const DEFAULT_USER_PERMISSIONS: string[] = [ 'watches.write.own' ]; +// TODO: figure out a better solution for doling out permissions +const DEFAULT_SUPERUSER_PERMISSIONS: string[] = [ + ...DEFAULT_USER_PERMISSIONS, + 'topics.create', + 'topics.delete', + 'topics.write', +]; + export const PRECHECKS: PRECHECK_TABLE = {}; // GET /api/users - get users @@ -120,7 +129,7 @@ export async function POST(req: Request, meta: Record): Promise): Promise