From da30b28eba13b0d344b3360c0bc2ce5633732bf9 Mon Sep 17 00:00:00 2001 From: x4base Date: Wed, 15 Jun 2016 23:53:07 +0800 Subject: [PATCH] Check ownership before a slice is deleted --- caravel/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/caravel/views.py b/caravel/views.py index d2e8e5b9db522..fe482c113f298 100644 --- a/caravel/views.py +++ b/caravel/views.py @@ -469,6 +469,9 @@ class SliceModelView(CaravelModelView, DeleteMixin): # noqa def pre_update(self, obj): check_ownership(obj) + def pre_delete(self, obj): + check_ownership(obj) + appbuilder.add_view( SliceModelView, "Slices",