import { hasDavScope } from "@/worker/auth/scopes"; import type { DavScope } from "@/worker/db/types"; export function hasFilesScope(authScopes: DavScope[], scope: "dav:files:read" | "dav:files:write"): boolean { return hasDavScope(authScopes, scope); } export function requiresFileWrite(method: string): boolean { return !["OPTIONS", "PROPFIND", "GET", "HEAD"].includes(method); }