diff options
author | Panagiotis Karalis <pkaralis@intracom-telecom.com> | 2019-01-24 15:04:15 +0200 |
---|---|---|
committer | Panagiotis Karalis <pkaralis@intracom-telecom.com> | 2019-04-10 18:06:01 +0300 |
commit | 71bdc6752f47b7da7282f786570fbe717973fb6d (patch) | |
tree | f8bc25e843293b52bd7012d9861941498f7a1b58 /3rd_party/static/testapi-ui/app.js | |
parent | c64b58a5a89ae7ac51f4f7b41e2842980e112346 (diff) |
Enhanced OVP Web Portal
The OVP web portal is updated with some improvements.
Those improvements are focused on the styling part of the portal
as well as on the introduction of new functions related to the
reviews, applications and the generally flow.
JIRA: DOVETAIL-670
JIRA: DOVETAIL-760
Change-Id: Ic5ca90eaaee36de43486ff55ad9aa788136587c6
Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
Diffstat (limited to '3rd_party/static/testapi-ui/app.js')
-rw-r--r-- | 3rd_party/static/testapi-ui/app.js | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/3rd_party/static/testapi-ui/app.js b/3rd_party/static/testapi-ui/app.js index edf7663..55603aa 100644 --- a/3rd_party/static/testapi-ui/app.js +++ b/3rd_party/static/testapi-ui/app.js @@ -55,11 +55,11 @@ templateUrl: 'testapi-ui/components/guidelines/guidelines.html', controller: 'GuidelinesController as ctrl' }). - // state('communityResults', { - // url: '/community_results', - // templateUrl: 'testapi-ui/components/results/results.html', - // controller: 'ResultsController as ctrl' - // }). + state('communityResults', { + url: '/community_results', + templateUrl: 'testapi-ui/components/results/results.html', + controller: 'ResultsController as ctrl' + }). state('userResults', { url: '/user_results', templateUrl: 'testapi-ui/components/results/results.html', @@ -173,12 +173,26 @@ $rootScope.auth.doSignIn = doSignIn; $rootScope.auth.doSignOut = doSignOut; $rootScope.auth.doSignCheck = doSignCheck; + $rootScope.auth.canReview = canReview; var sign_in_url = testapiApiUrl + '/auth/signin'; var sign_out_url = testapiApiUrl + '/auth/signout'; var profile_url = testapiApiUrl + '/profile'; + function canReview(user) { + if (typeof user.role == undefined) { + return false; + } else if (user.role.indexOf('administrator') != -1) { + return true; + } else if (user.role.indexOf('reviewer') != -1) { + return true; + } else { + return false; + } + } + + /** This function initiates a sign in. */ function doSignIn(type) { $rootScope.auth.type = type; |