From 075badc55afce1e00f67b40717ecf99903420db3 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Thu, 15 Jan 2015 10:11:57 +0100 Subject: [PATCH] make delete permission configurable via global option --- expert/browser/search.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/expert/browser/search.py b/expert/browser/search.py index 575a97f..c264073 100644 --- a/expert/browser/search.py +++ b/expert/browser/search.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2013 Helmut Merz helmutm@cy55.de +# Copyright (c) 2015 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -90,7 +90,8 @@ class Search(ConceptView): @Lazy def showActions(self): - return checkPermission('loops.ManageSite', self.context) + perm = (self.globalOptions('delete_permission') or ['loops.ManageSite'])[0] + return checkPermission(perm, self.context) #return canWriteObject(self.context) @property