mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-24 09:49:24 +02:00
Update:Express middleware sets req.user to new data model, openid permissions functions moved to new data model
This commit is contained in:
parent
29a15858f4
commit
2472b86284
29 changed files with 474 additions and 430 deletions
|
@ -5,7 +5,7 @@ class CacheController {
|
|||
|
||||
// POST: api/cache/purge
|
||||
async purgeCache(req, res) {
|
||||
if (!req.userNew.isAdminOrUp) {
|
||||
if (!req.user.isAdminOrUp) {
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
await CacheManager.purgeAll()
|
||||
|
@ -14,7 +14,7 @@ class CacheController {
|
|||
|
||||
// POST: api/cache/items/purge
|
||||
async purgeItemsCache(req, res) {
|
||||
if (!req.userNew.isAdminOrUp) {
|
||||
if (!req.user.isAdminOrUp) {
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
await CacheManager.purgeItems()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue