mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-25 23:16:27 -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([
|
export const Scope = z.enum([
|
||||||
"user", // permissions to /auth/me, with email docked
|
"user", // permissions to /auth/me, with email docked
|
||||||
"email", // adds email back to /auth/me
|
"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_files", // allows an app to manage an account's files
|
||||||
"manage_account", // allows an app to manage an account
|
"manage_account", // allows an app to manage an account
|
||||||
"manage_server" // allows an app to affect other users, files on admin accounts
|
"manage_server" // allows an app to affect other users, files on admin accounts
|
||||||
|
|
|
@ -264,7 +264,7 @@ export default function (files: Files) {
|
||||||
router.patch(
|
router.patch(
|
||||||
"/:user",
|
"/:user",
|
||||||
requiresAccount,
|
requiresAccount,
|
||||||
requiresPermissions("manage"),
|
requiresPermissions("manage_account"),
|
||||||
async (ctx) => {
|
async (ctx) => {
|
||||||
const body = (await ctx.req.json()) as UserUpdateParameters
|
const body = (await ctx.req.json()) as UserUpdateParameters
|
||||||
const actor = ctx.get("account")!
|
const actor = ctx.get("account")!
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default function(files: Files) {
|
||||||
router.on(
|
router.on(
|
||||||
["PUT", "POST"],
|
["PUT", "POST"],
|
||||||
"/",
|
"/",
|
||||||
requiresPermissions("upload"),
|
requiresPermissions("manage_files"),
|
||||||
(ctx) => { return new Promise((resolve,reject) => {
|
(ctx) => { return new Promise((resolve,reject) => {
|
||||||
ctx.env.incoming.removeAllListeners("data") // remove hono's buffering
|
ctx.env.incoming.removeAllListeners("data") // remove hono's buffering
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue