diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index 20147e6..577ccb7 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -43,6 +43,10 @@ class App {
isLoggedIn() {
return this.user != null && this.token != null;
}
+
+ canUpload() {
+ return this.isLoggedIn() && (this.user?.can_upload || this.isAdmin());
+ }
}
export const app = new App();
\ No newline at end of file
diff --git a/frontend/src/pages/publish_page.tsx b/frontend/src/pages/publish_page.tsx
index 807e104..a86ea48 100644
--- a/frontend/src/pages/publish_page.tsx
+++ b/frontend/src/pages/publish_page.tsx
@@ -94,7 +94,7 @@ export default function PublishPage() {
return