aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv_testapi
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2018-08-30 11:30:05 +0300
committerStamatis Katsaounis <mokats@intracom-telecom.com>2018-08-30 11:30:05 +0300
commitdf480a31dcbcc8c7a5373419d0a7561f548e1c52 (patch)
tree514f23373bcf9bd5225604d41b64cbd1b4f3de49 /opnfv_testapi
parentbe9e0c7bd184cf7624753c8166e51dbc858d3717 (diff)
Disable Community Results page and restrict access to results
to logged in users JIRA: DOVETAIL-736 This patch disables the Community Results page. Furthermore, allows only logged in users to fetch results from the rest api. Finally, fixes a minor bug on the javascript side, where the name of the logged in user is stored. Change-Id: Iedf1f170746501455662dc7e1d01ae0508f79488 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to 'opnfv_testapi')
-rw-r--r--opnfv_testapi/resources/test_handlers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/opnfv_testapi/resources/test_handlers.py b/opnfv_testapi/resources/test_handlers.py
index 0cc60d5..5ecb176 100644
--- a/opnfv_testapi/resources/test_handlers.py
+++ b/opnfv_testapi/resources/test_handlers.py
@@ -74,6 +74,10 @@ class TestsCLHandler(GenericTestHandler):
'per_page': CONF.api_results_per_page
}
+ curr_user = self.get_secure_cookie(auth_const.OPENID)
+ if curr_user is None:
+ raises.Unauthorized(message.no_auth())
+
query = yield self.set_query()
yield self._list(query=query, **limitations)
logging.debug('list end')