mirror of
https://github.com/willchen96/mike.git
synced 2026-07-26 23:51:08 +02:00
Require review owner for tabular settings edits
This commit is contained in:
parent
a211b92f38
commit
2a6d9eac3b
1 changed files with 8 additions and 0 deletions
|
|
@ -534,6 +534,14 @@ tabularRouter.patch("/:reviewId", requireAuth, async (req, res) => {
|
|||
);
|
||||
if (!access.ok)
|
||||
return void res.status(404).json({ detail: "Review not found" });
|
||||
if (
|
||||
(req.body.title != null || req.body.document_ids != null) &&
|
||||
!access.isOwner
|
||||
) {
|
||||
return void res.status(403).json({
|
||||
detail: "Only the review owner can change review settings",
|
||||
});
|
||||
}
|
||||
if (req.body.columns_config != null) {
|
||||
if (!access.isOwner) {
|
||||
return void res.status(403).json({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue