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 0d34b75 commit d5ac4c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/articles/public/controllers/articles.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ angular.module('mean').controller('ArticlesController', ['$scope', '$stateParams
$scope.global = Global;

$scope.hasAuthorization = function(article){
return ($scope.global.isAdmin || (article.user && (article.user._id === $scope.global.user._id)));
return ((($scope.global.isAdmin) || (!article.user)) || (article.user && (article.user._id === $scope.global.user._id)));
};

$scope.create = function() {
Expand Down

0 comments on commit d5ac4c3

Please sign in to comment.