Commit 1765c9c6 authored by NGPixel's avatar NGPixel

fix: apply Guest modified permissions immediately

parent 05e40b6d
...@@ -190,6 +190,12 @@ router.post('/users/:id', (req, res) => { ...@@ -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) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment