mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 20:27:23 +00:00
Fix uploads for non-admin users
This commit is contained in:
@@ -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();
|
Reference in New Issue
Block a user