mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-12-29 03:36:06 +08:00
Changed permissions for deleteing webauthn token
This commit is contained in:
parent
6bd2677abc
commit
46961586c5
1 changed files with 2 additions and 2 deletions
|
@ -101,9 +101,9 @@ module.exports = (db, server, userHandler) => {
|
|||
|
||||
// permissions check
|
||||
if (req.user && req.user === result.value.user) {
|
||||
req.validate(roles.can(req.role).deleteOwn('users'));
|
||||
req.validate(roles.can(req.role).updateOwn('users'));
|
||||
} else {
|
||||
req.validate(roles.can(req.role).deleteAny('users'));
|
||||
req.validate(roles.can(req.role).updateAny('users'));
|
||||
}
|
||||
|
||||
let user = new ObjectId(result.value.user);
|
||||
|
|
Loading…
Reference in a new issue