change that, actually

This commit is contained in:
May 2024-05-21 20:05:33 -07:00
parent 1efb6802a0
commit b5bf657d79
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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")!

View file

@ -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