Update controllers to use new user model

This commit is contained in:
advplyr committed 2024-08-10 17:15:21 -05:00
1 parent 202ceb02b5
commit 68ef3a07a7
20 files changed
+396 -304

No files matched your search

+2 -2
View File
@@ -113,8 +113,8 @@ class BackupController {
}
middleware(req, res, next) {
if (!req.user.isAdminOrUp) {
Logger.error(`[BackupController] Non-admin user attempting to access backups`, req.user)
if (!req.userNew.isAdminOrUp) {
Logger.error(`[BackupController] Non-admin user "${req.userNew.username}" attempting to access backups`)
return res.sendStatus(403)
}