mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-15 08:19:37 +00: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
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue