Fix uploads for non-admin users

This commit is contained in:
2025-05-17 10:21:37 +08:00
parent 1c79b6a0a3
commit c1eb356a15
3 changed files with 6 additions and 2 deletions

View File

@@ -94,7 +94,7 @@ export default function PublishPage() {
return <ErrorAlert className={"m-4"} message={t("You are not logged in. Please log in to access this page.")} />
}
if (!app.user?.is_admin) {
if (!app.canUpload()) {
return <ErrorAlert className={"m-4"} message={t("You are not authorized to access this page.")} />
}