Skip to content

Commit

Permalink
Update articles.js
Browse files Browse the repository at this point in the history
  • Loading branch information
enkodellc committed May 13, 2014
1 parent f42ddb8 commit 2755161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/articles/server/routes/articles.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var articles = require('../controllers/articles');

// Article authorization helpers
var hasAuthorization = function(req, res, next) {
if (res.adminEnabled() || (req.article.user && (req.article.user_id === req.user._id))) {
if (req.isAdmin || (req.article.user && (req.article.user_id !== req.user._id))) {
next();
}
else {
Expand Down

0 comments on commit 2755161

Please sign in to comment.