mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-07 11:12:45 +02:00
Update:Give full permissions to admin users except updating root or viewing root api token #137
This commit is contained in:
@@ -239,8 +239,11 @@ class ApiRouter {
|
||||
//
|
||||
// Helper Methods
|
||||
//
|
||||
userJsonWithItemProgressDetails(user) {
|
||||
userJsonWithItemProgressDetails(user, hideRootToken = false) {
|
||||
var json = user.toJSONForBrowser()
|
||||
if (json.type === 'root' && hideRootToken) {
|
||||
json.token = ''
|
||||
}
|
||||
|
||||
json.mediaProgress = json.mediaProgress.map(lip => {
|
||||
var libraryItem = this.db.libraryItems.find(li => li.id === lip.id)
|
||||
|
||||
Reference in New Issue
Block a user