mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
change that, actually
This commit is contained in:
parent
1efb6802a0
commit
b5bf657d79
|
@ -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
|
||||
|
|
|
@ -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")!
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue