mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-09 07:14:52 +02:00
Add admin middleware for StatsController
This commit is contained in:
@ -65,7 +65,7 @@ class StatsController {
|
||||
*/
|
||||
async middleware(req, res, next) {
|
||||
if (!req.user.isAdminOrUp) {
|
||||
Logger.error(`[StatsController] Non-root user "${req.user.username}" attempted to access stats route`)
|
||||
Logger.error(`[StatsController] Non-admin user "${req.user.username}" attempted to access stats route`)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user