summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/profile/profileController.js
diff options
context:
space:
mode:
authorSerena Feng <feng.xiaowei@zte.com.cn>2018-01-18 06:58:27 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-18 06:58:27 +0000
commitf82dd79721fec6d4d6e5ac8b7b27cfec689b92ea (patch)
treeb422fd88e596f76af61b71846006c2ad1b1505b3 /testapi/opnfv_testapi/ui/components/profile/profileController.js
parent62fb9a03e047d70bb15c67d2748ffe377273d0b6 (diff)
parent16e83d89c4d4d64188bf6d0249050b2740dfd913 (diff)
Merge "Bug fixes in results, tastcases and header file"
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/profile/profileController.js')
-rw-r--r--testapi/opnfv_testapi/ui/components/profile/profileController.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/testapi/opnfv_testapi/ui/components/profile/profileController.js b/testapi/opnfv_testapi/ui/components/profile/profileController.js
index 5dbdf7b..e34e745 100644
--- a/testapi/opnfv_testapi/ui/components/profile/profileController.js
+++ b/testapi/opnfv_testapi/ui/components/profile/profileController.js
@@ -35,7 +35,7 @@
ProfileController.$inject = [
'$scope', '$http', 'testapiApiUrl', 'PubKeys',
- '$uibModal', 'raiseAlert', '$state'
+ '$uibModal', 'raiseAlert', '$state' , 'authenticate'
];
/**
@@ -44,7 +44,7 @@
* account-specific information.
*/
function ProfileController($scope, $http, testapiApiUrl,
- PubKeys, $uibModal, raiseAlert, $state) {
+ PubKeys, $uibModal, raiseAlert, $state, authenticate) {
var ctrl = this;
@@ -53,7 +53,7 @@
ctrl.openShowPubKeyModal = openShowPubKeyModal;
// Must be authenticated to view this page.
- if (!$scope.auth.isAuthenticated) {
+ if (!$scope.auth.isAuthenticated || !authenticate) {
$state.go('home');
}
@@ -115,8 +115,9 @@
ctrl.updatePubKeys();
});
}
-
- ctrl.authRequest = $scope.auth.doSignCheck().then(ctrl.updatePubKeys);
+ if(authenticate){
+ ctrl.authRequest = $scope.auth.doSignCheck().then(ctrl.updatePubKeys);
+ }
}
angular