Skip to content

Commit

Permalink
fix(projects) now only authenticated people can see projects
Browse files Browse the repository at this point in the history
  • Loading branch information
cironunes committed Jun 24, 2013
1 parent fe40d33 commit 4f721e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/src/app/projects/projects.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
angular.module('projects', ['resources.projects', 'productbacklog', 'sprints'])
angular.module('projects', ['resources.projects', 'productbacklog', 'sprints', 'security.authorization'])

.config(['$routeProvider', function ($routeProvider) {
.config(['$routeProvider', 'securityAuthorizationProvider', function ($routeProvider, securityAuthorizationProvider) {
$routeProvider.when('/projects', {
templateUrl:'projects/projects-list.tpl.html',
controller:'ProjectsViewCtrl',
resolve:{
projects:['Projects', function (Projects) {
//TODO: fetch only for the current user
return Projects.all();
}]
}],
authenticatedUser: securityAuthorizationProvider.requireAuthenticatedUser
}
});
}])
Expand Down

0 comments on commit 4f721e6

Please sign in to comment.