Skip to content

Commit

Permalink
fix(account): add authentication requirement for settings view
Browse files Browse the repository at this point in the history
Add « authenticate : true » in route for the settings view in
account.js and account.coffee for ngRoute and ui-Route.

Closes #327
  • Loading branch information
remicastaing authored and DaftMonk committed Jul 12, 2014
1 parent 306fa12 commit 9105c0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/templates/client/app/account(auth)/account(coffee).coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ angular.module('<%= scriptAppName %>')
)
.when('/settings',
templateUrl: 'app/account/settings/settings.html'
controller: 'SettingsCtrl'
controller: 'SettingsCtrl',
authenticate: true
)<% } %><% if(filters.uirouter) { %>.config ($stateProvider) ->
$stateProvider
.state('login',
Expand All @@ -29,5 +30,6 @@ angular.module('<%= scriptAppName %>')
.state('settings',
url: '/settings',
templateUrl: 'app/account/settings/settings.html'
controller: 'SettingsCtrl'
controller: 'SettingsCtrl',
authenticate: true
)<% } %>
3 changes: 2 additions & 1 deletion app/templates/client/app/account(auth)/account(js).js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ angular.module('<%= scriptAppName %>')
.state('settings', {
url: '/settings',
templateUrl: 'app/account/settings/settings.html',
controller: 'SettingsCtrl'
controller: 'SettingsCtrl',
authenticate: true
});
});<% } %>

0 comments on commit 9105c0f

Please sign in to comment.