diff options
author | thuva4 <tharma.thuva@gmail.com> | 2018-02-22 09:57:30 +0530 |
---|---|---|
committer | thuva4 <tharma.thuva@gmail.com> | 2018-02-22 09:59:11 +0530 |
commit | 269a45a223c0b67972f3fe249fd2bbe2747dd70f (patch) | |
tree | 31a4aab84be4589f1eea9852835c90e81d56d066 /testapi/opnfv_testapi/handlers/base_handlers.py | |
parent | 86f8a2036521e9401d8c9431e4b6412878e6d94f (diff) |
prevent the delete/update for projects
Prevent user from deleting or updating projects
which are associated with testcases
JIRA: RELENG-335
JIRA: RELENG-336
Change-Id: Ic0a8841a4632329f4b58aeb97cb93a91bacc2b06
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/handlers/base_handlers.py')
-rw-r--r-- | testapi/opnfv_testapi/handlers/base_handlers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/testapi/opnfv_testapi/handlers/base_handlers.py b/testapi/opnfv_testapi/handlers/base_handlers.py index 537077d..ed4aeb2 100644 --- a/testapi/opnfv_testapi/handlers/base_handlers.py +++ b/testapi/opnfv_testapi/handlers/base_handlers.py @@ -179,6 +179,7 @@ class GenericApiHandler(web.RequestHandler): @gen.coroutine @check.not_exist @check.is_authorized + @check.is_allowed def _delete(self, data, query=None): yield dbapi.db_delete(self.table, query) self.finish_request() @@ -189,6 +190,7 @@ class GenericApiHandler(web.RequestHandler): @check.not_exist @check.updated_one_not_exist @check.is_authorized + @check.is_allowed def _update(self, data, query=None, **kwargs): data = self.table_cls.from_dict(data) update_req = self._update_requests(data) |