X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Ftestapi%2Fopnfv_testapi%2Fcommon%2Fcheck.py;h=fd30c9b3f4db245c5772f5672ddfe3ef9741c4df;hb=410025769a5f59469722704cdb1d53bfe1d20ba0;hp=e80b1c6b78508dc0acb241aef6927540f16e838d;hpb=63fbd31ac218846da13f84ee17ef7a61e159055f;p=releng.git diff --git a/utils/test/testapi/opnfv_testapi/common/check.py b/utils/test/testapi/opnfv_testapi/common/check.py index e80b1c6b7..fd30c9b3f 100644 --- a/utils/test/testapi/opnfv_testapi/common/check.py +++ b/utils/test/testapi/opnfv_testapi/common/check.py @@ -14,13 +14,14 @@ from tornado import gen from opnfv_testapi.common import constants from opnfv_testapi.common import message from opnfv_testapi.common import raises +from opnfv_testapi.common.config import CONF from opnfv_testapi.db import api as dbapi def is_authorized(method): @functools.wraps(method) def wrapper(self, *args, **kwargs): - if self.table in ['pods']: + if CONF.api_authenticate and self.table in ['pods']: testapi_id = self.get_secure_cookie(constants.TESTAPI_ID) if not testapi_id: raises.Unauthorized(message.not_login())