mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
parent
c90bd941b5
commit
561cde6e7e
20 changed files with 133 additions and 98 deletions
|
|
@ -29,12 +29,9 @@ export default async (
|
|||
|
||||
const { currentPassword, newPassword } = req.body;
|
||||
const { id } = req.query;
|
||||
const {
|
||||
user: { id: userId, isAdmin },
|
||||
} = req.auth;
|
||||
|
||||
if (req.method === 'POST') {
|
||||
if (!isAdmin && !(await canUpdateUser(userId, id))) {
|
||||
if (!(await canUpdateUser(req.auth, id))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue