make delete permission configurable via global option

This commit is contained in:
Helmut Merz 2015-01-15 10:11:57 +01:00
parent 0ca62cbe91
commit 075badc55a

View file

@ -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