mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-24 09:49:24 +02:00
Update:Give full permissions to admin users except updating root or viewing root api token #137
This commit is contained in:
parent
195a30096f
commit
2e070227ab
17 changed files with 75 additions and 71 deletions
|
@ -320,7 +320,7 @@ class LibraryController {
|
|||
|
||||
// PATCH: Change the order of libraries
|
||||
async reorder(req, res) {
|
||||
if (!req.user.isRoot) {
|
||||
if (!req.user.isAdminOrUp) {
|
||||
Logger.error('[LibraryController] ReorderLibraries invalid user', req.user)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ class LibraryController {
|
|||
}
|
||||
|
||||
async matchAll(req, res) {
|
||||
if (!req.user.isRoot) {
|
||||
if (!req.user.isAdminOrUp) {
|
||||
Logger.error(`[LibraryController] Non-root user attempted to match library items`, req.user)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ class LibraryController {
|
|||
|
||||
// GET: api/scan (Root)
|
||||
async scan(req, res) {
|
||||
if (!req.user.isRoot) {
|
||||
if (!req.user.isAdminOrUp) {
|
||||
Logger.error(`[LibraryController] Non-root user attempted to scan library`, req.user)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue