Skip to content

Commit

Permalink
add check and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rsiminel committed Nov 4, 2024
1 parent db401a1 commit d7c61c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## 1.4.32 (Unreleased)

* Clearer error message when adding a website
* Add User, Project and Group static classes to front end (refactor)
* Add checks for website owner update

## 1.4.31 (2024-09-27)

Expand Down
5 changes: 4 additions & 1 deletion routes/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ router.put('/web/:id/owner/:old/:new', async function(req, res) {
return;
}
session_user.is_admin = isadmin;

if(!session_user.is_admin) {
res.status(401).send({message: 'Not authorized'});
return;
}

if (req.params.old == req.params.new) {
res.status(300).send({message: 'Old owner and new owner are the same person'});
return;
}
try {
await dbsrv.mongo_web().findOne({name: req.params.id});
} catch(e) {
Expand Down

0 comments on commit d7c61c5

Please sign in to comment.