mirror of
https://github.com/willchen96/mike.git
synced 2026-07-26 23:51:08 +02:00
Merge pull request #175 from lawyered0/fix/tabular-review-owner-settings
Require review owner for tabular settings edits
This commit is contained in:
commit
a3ab1b3895
1 changed files with 8 additions and 0 deletions
|
|
@ -395,6 +395,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