aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv_testapi/resources/application_handlers.py
diff options
context:
space:
mode:
authorPanagiotis Karalis <pkaralis@intracom-telecom.com>2019-04-18 18:48:22 +0300
committerPanagiotis Karalis <pkaralis@intracom-telecom.com>2019-04-24 17:04:43 +0300
commitda620c17769c0357e4a9137eedbb7cf044cc38d4 (patch)
treee2008953fa3637cd9da96fece5c2165e703436df /opnfv_testapi/resources/application_handlers.py
parent6ade07b42e9ef39dafda4504bc61eb4661b10cde (diff)
Bug fix for ONAP/OVP portals
During portal review, some errors have been noticed and fixed. - 'no role', In the 'My Results' page are displayed also results from other users. - 'user,reviewer' role, In the 'My Results' page are appeared all results and not only for the current user. - 'administrator' role, The applications are not appeared in the application page - 'reviewer' role, Reviewers cannot submit votes and after few seconds a 'time out' is received. Change-Id: Ia9bc3c4fdcac1b37ac03adff64ff689ca2428c0f Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
Diffstat (limited to 'opnfv_testapi/resources/application_handlers.py')
-rw-r--r--opnfv_testapi/resources/application_handlers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/opnfv_testapi/resources/application_handlers.py b/opnfv_testapi/resources/application_handlers.py
index 7d823b8..653e6b5 100644
--- a/opnfv_testapi/resources/application_handlers.py
+++ b/opnfv_testapi/resources/application_handlers.py
@@ -236,19 +236,19 @@ class ApplicationsGURHandler(GenericApplicationHandler):
data = json.loads(self.request.body)
item = data.get('item')
value = data.get(item)
+ owner = data.get('owner')
logging.debug('%s:%s', item, value)
try:
- self.update(application_id, item, value)
+ self.update(application_id, item, value, owner)
except Exception as e:
logging.error('except:%s', e)
return
@gen.coroutine
- def update(self, application_id, item, value):
+ def update(self, application_id, item, value, owner):
self.json_args = {}
self.json_args[item] = value
- query = {'_id': objectid.ObjectId(application_id), 'owner':
- self.get_secure_cookie(auth_const.OPENID)}
+ query = {'_id': objectid.ObjectId(application_id), 'owner': owner}
db_keys = ['_id', 'owner']
if item == 'approved':
if value == 'true':