From 99e11fe8d8d015e3be34fd2be98058e55fa6300d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 26 Feb 2015 18:01:55 -0600 Subject: [PATCH] Hide deleted field from product details, according to permissions. --- tailbone/views/products.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tailbone/views/products.py b/tailbone/views/products.py index c9c69902..ef6bf258 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -291,6 +291,8 @@ class ProductCrud(CrudView): if not self.readonly: del fs.regular_price del fs.current_price + if not self.request.has_perm('products.view_deleted'): + del fs.deleted return fs def pre_crud(self, product):