admins can still view all comment streams

This commit is contained in:
Riley Davis
2016-12-15 13:18:28 -07:00
parent f4ee28c618
commit 39fdd168fa
+2 -2
View File
@@ -24,8 +24,8 @@ router.get('/', (req, res, next) => {
return; return;
} }
// only return comment lists for the owner of the comments // if the user is not an admin, only return comment list for the owner of the comments
if (req.user.id !== user_id) { if (req.user.id !== user_id && !authorization.has(req.user, 'admin')) {
next(authorization.ErrNotAuthorized); next(authorization.ErrNotAuthorized);
return; return;
} }