diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2017-12-18 01:07:26 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-12-18 01:07:26 +0000 |
commit | 691d69df901b68ea5e85ca254bd7f2c270393182 (patch) | |
tree | b89b5479a393ae6c4d6aa5242ceec79dc3cab480 /testapi/opnfv_testapi/ui/app.js | |
parent | 25345fc94b0cfa24df4fc37cf4aa6befeaefad59 (diff) | |
parent | 4e98903ccae3363090de8fefb463b64a943b8f9f (diff) |
Merge "Redesign the projects page & project page"
Diffstat (limited to 'testapi/opnfv_testapi/ui/app.js')
-rw-r--r-- | testapi/opnfv_testapi/ui/app.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/testapi/opnfv_testapi/ui/app.js b/testapi/opnfv_testapi/ui/app.js index 28e5810..8c85686 100644 --- a/testapi/opnfv_testapi/ui/app.js +++ b/testapi/opnfv_testapi/ui/app.js @@ -124,14 +124,14 @@ .run(setup); setup.$inject = [ - '$http', '$rootScope', '$window', '$state', 'testapiApiUrl' + '$http', '$rootScope', '$window', '$state', 'testapiApiUrl', "authenticate" ]; /** * Set up the app with injections into $rootscope. This is mainly for auth * functions. */ - function setup($http, $rootScope, $window, $state, testapiApiUrl) { + function setup($http, $rootScope, $window, $state, testapiApiUrl, authenticate) { $rootScope.auth = {}; $rootScope.auth.doSignIn = doSignIn; @@ -165,7 +165,11 @@ success(function (data) { $rootScope.auth.currentUser = data; $rootScope.auth.isAuthenticated = true; - $rootScope.auth.projectNames = $rootScope.auth.doSubmitterCheck(data.groups); + if(authenticate){ + $rootScope.auth.projectNames = $rootScope.auth.doSubmitterCheck(data.groups); + }else{ + $rootScope.auth.projectNames = ["anonymous"] + } }). error(function () { $rootScope.auth.currentUser = null; |