mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-11-07 16:44:16 +01:00
Update user default permissions
This commit is contained in:
parent
790c1fb34a
commit
47712e63f1
@ -270,7 +270,7 @@ class UserController {
|
||||
const permissions = {
|
||||
...user.permissions
|
||||
}
|
||||
const defaultPermissions = Database.userModel.getDefaultPermissionsForUserType(updatePayload.type || 'user')
|
||||
const defaultPermissions = Database.userModel.getDefaultPermissionsForUserType(updatePayload.type || user.type || 'user')
|
||||
for (const key in updatePayload.permissions) {
|
||||
// Check that the key is a valid permission key or is included in the default permissions
|
||||
if (permissions[key] !== undefined || defaultPermissions[key] !== undefined) {
|
||||
|
Loading…
Reference in New Issue
Block a user