Tweak how we auto-filter 'deleted' products
Hopefully this doesn't break anything? This change is required for a user who has 'become root' to see deleted products.
This commit is contained in:
parent
68ba3a7fcb
commit
2b3b69ed70
|
@ -113,7 +113,9 @@ class ProductsView(MasterView):
|
|||
user = session.merge(user)
|
||||
|
||||
query = session.query(model.Product)
|
||||
if not auth.has_permission(session, user, 'products.view_deleted'):
|
||||
# TODO: was this old `has_permission()` call here for a reason..? hope not..
|
||||
# if not auth.has_permission(session, user, 'products.view_deleted'):
|
||||
if not self.request.has_perm('products.view_deleted'):
|
||||
query = query.filter(model.Product.deleted == False)
|
||||
|
||||
# TODO: This used to be a good idea I thought...but in dev it didn't
|
||||
|
|
Loading…
Reference in a new issue