fix: apply Guest modified permissions immediately
This commit is contained in:
parent
05e40b6d5c
commit
1765c9c652
@ -190,6 +190,12 @@ router.post('/users/:id', (req, res) => {
|
|||||||
} else {
|
} else {
|
||||||
return usr.save()
|
return usr.save()
|
||||||
}
|
}
|
||||||
|
}).then((usr) => {
|
||||||
|
// Update guest rights for future requests
|
||||||
|
if (usr.provider === 'local' && usr.email === 'guest') {
|
||||||
|
rights.guest = usr
|
||||||
|
}
|
||||||
|
return usr
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
return res.json({ msg: 'OK' })
|
return res.json({ msg: 'OK' })
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user