Commit 6ee6475f authored by Yusei Tahara's avatar Yusei Tahara

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 c09eef38
Pipeline #28130 failed with stage
in 0 seconds
...@@ -107,3 +107,12 @@ try: ...@@ -107,3 +107,12 @@ try:
del BTreeFolder2Base.__getitem__ del BTreeFolder2Base.__getitem__
except AttributeError: except AttributeError:
pass 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