Skip to content

Commit b2a0bac

Browse files
authored
Merge pull request #3796 from Iron-56/spelling-error
Fixed a spelling error in README
2 parents 35f2551 + c13920c commit b2a0bac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/controllers/project.controller.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ export async function changeProjectVisibility(req, res) {
296296
.json({ success: false, message: 'No project found.' });
297297
}
298298

299+
if (!project.user.equals(req.user._id)) {
300+
return res
301+
.status(403)
302+
.json({ success: false, message: 'Unauthorized action.' });
303+
}
304+
299305
if (newVisibility !== 'Private' && newVisibility !== 'Public') {
300306
return res.status(400).json({ success: false, message: 'Invalid data.' });
301307
}

0 commit comments

Comments
 (0)