Skip to content

Commit 9105c0f

Browse files
remicastaingDaftMonk
authored andcommitted
fix(account): add authentication requirement for settings view
Add « authenticate : true » in route for the settings view in account.js and account.coffee for ngRoute and ui-Route. Closes #327
1 parent 306fa12 commit 9105c0f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/templates/client/app/account(auth)/account(coffee).coffee

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ angular.module('<%= scriptAppName %>')
1313
)
1414
.when('/settings',
1515
templateUrl: 'app/account/settings/settings.html'
16-
controller: 'SettingsCtrl'
16+
controller: 'SettingsCtrl',
17+
authenticate: true
1718
)<% } %><% if(filters.uirouter) { %>.config ($stateProvider) ->
1819
$stateProvider
1920
.state('login',
@@ -29,5 +30,6 @@ angular.module('<%= scriptAppName %>')
2930
.state('settings',
3031
url: '/settings',
3132
templateUrl: 'app/account/settings/settings.html'
32-
controller: 'SettingsCtrl'
33+
controller: 'SettingsCtrl',
34+
authenticate: true
3335
)<% } %>

app/templates/client/app/account(auth)/account(js).js

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ angular.module('<%= scriptAppName %>')
3131
.state('settings', {
3232
url: '/settings',
3333
templateUrl: 'app/account/settings/settings.html',
34-
controller: 'SettingsCtrl'
34+
controller: 'SettingsCtrl',
35+
authenticate: true
3536
});
3637
});<% } %>

0 commit comments

Comments
 (0)