Commit f0b5ca56 authored by Yusei Tahara's avatar Yusei Tahara Committed by Kazuhiko Shiozaki

BTreeFolder2: Disable manage_delAllObjects

Protect data from human error. There are unbelievable mistakes. ERP5
is a place to store important data that must not be deleted easily.
parent f7ee67ea
......@@ -107,3 +107,12 @@ try:
del BTreeFolder2Base.__getitem__
except AttributeError:
pass
def manage_delAllObjects(self, REQUEST=None):
"""Disable dangerous method"""
raise RuntimeError(
"manage_delAllObjects is disabled in ERP5 to protect data from "
"human error. There are unbelievable mistakes. ERP5 is a place "
"to store important data that must not be deleted easily.")
BTreeFolder2Base.manage_delAllObjects = manage_delAllObjects
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment