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