diff --git a/src/server/lib/schemas/auth.ts b/src/server/lib/schemas/auth.ts index adefd40..cfc1b22 100644 --- a/src/server/lib/schemas/auth.ts +++ b/src/server/lib/schemas/auth.ts @@ -3,7 +3,7 @@ import { z } from "zod"; export const Scope = z.enum([ "user", // permissions to /auth/me, with email docked "email", // adds email back to /auth/me - "manage_private", // allows app to manage private files + "private", // allows app to manage and read private files "manage_files", // allows an app to manage an account's files "manage_account", // allows an app to manage an account "manage_server" // allows an app to affect other users, files on admin accounts diff --git a/src/server/routes/api/v1/account/index.ts b/src/server/routes/api/v1/account/index.ts index 89e7eb3..bc16ce1 100644 --- a/src/server/routes/api/v1/account/index.ts +++ b/src/server/routes/api/v1/account/index.ts @@ -264,7 +264,7 @@ export default function (files: Files) { router.patch( "/:user", requiresAccount, - requiresPermissions("manage"), + requiresPermissions("manage_account"), async (ctx) => { const body = (await ctx.req.json()) as UserUpdateParameters const actor = ctx.get("account")! diff --git a/src/server/routes/api/v1/file/index.ts b/src/server/routes/api/v1/file/index.ts index e5fd996..15a52f0 100644 --- a/src/server/routes/api/v1/file/index.ts +++ b/src/server/routes/api/v1/file/index.ts @@ -28,7 +28,7 @@ export default function(files: Files) { router.on( ["PUT", "POST"], "/", - requiresPermissions("upload"), + requiresPermissions("manage_files"), (ctx) => { return new Promise((resolve,reject) => { ctx.env.incoming.removeAllListeners("data") // remove hono's buffering