Skip to content

Commit

Permalink
Merge pull request techx#45 from chriswongtv/fix-confirmation-permiss…
Browse files Browse the repository at this point in the history
…ions

Fix confirmation page permission bug
  • Loading branch information
jlin816 authored Dec 31, 2017
2 parents e279373 + fb27bb1 commit 808e925
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/client/src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ angular.module('reg')
templateUrl: "views/confirmation/confirmation.html",
controller: 'ConfirmationCtrl',
data: {
requireCompletedProfile: true
requireAdmitted: true
},
resolve: {
currentUser: function(UserService){
Expand Down Expand Up @@ -186,7 +186,7 @@ angular.module('reg')
var requireLogin = toState.data.requireLogin;
var requireAdmin = toState.data.requireAdmin;
var requireVerified = toState.data.requireVerified;
var requireCompletedProfile = toState.data.requireCompletedProfile;
var requireAdmitted = toState.data.requireAdmitted;

if (requireLogin && !Session.getToken()) {
event.preventDefault();
Expand All @@ -203,7 +203,7 @@ angular.module('reg')
$state.go('app.dashboard');
}

if (requireCompletedProfile && !Session.getUser().completedProfile) {
if (requireAdmitted && !Session.getUser().status.admitted) {
event.preventDefault();
$state.go('app.dashboard');
}
Expand Down

0 comments on commit 808e925

Please sign in to comment.