Commit 6680e4fa authored by Rafael Monnerat's avatar Rafael Monnerat

Remove commented code

It is not the goal of IntrospectionTool set edit zope.conf.
parent eb87f355
......@@ -415,56 +415,6 @@ class IntrospectionTool(LogMixin, BaseTool):
"""
return getConfiguration().products
#security.declareProtected(Permissions.ManagePortal, 'setProductPath')
#def setProductPath(self, relative_path):
# """
# Set the value of SOFTWARE_HOME for zopectl startup script
# or from zope.conf (whichever is most relevant)
# Rationale: multiple versions of Products can be present
# on the same system
# relative_path is usually defined by a number of release
# (ex. 5.4.2)
# WARNING: the list of possible path should be protected
# if possible (ex. /etc/erp5/product)
# """
# config = self._loadExternalConfig()
# allowed_path_list = config.get("main", "products").split("\n")
# base_product_path_list = config.get("base", "base_product_path").split("\n")
# if len(base_product_path_list) == 0:
# raise Unauthorized(
# "base_product_path_list is not defined into configuration.")
# base_product_path = base_product_path_list[0]
# path = base_product_path + relative_path
# if path not in allowed_path_list:
# raise Unauthorized(
# "You are setting one Unauthorized path as Product Path (%s)." \
# % (path))
# if path not in allowed_path_list:
# raise Unauthorized("You are setting one Unauthorized path as Product Path.")
# config_file = self._getZopeConfigurationFile("etc/zope.conf")
# new_file_list = []
# for line in config_file:
# new_line = line
# if line.strip(" ").startswith("products %s" % (base_product_path)):
# # Only comment the line, so it can easily reverted
# new_line = "#%s" % (line)
# new_file_list.append(new_line)
# # Append the new line.
# new_file_list.append("products %s\n" % (path))
# config_file.close()
# # reopen file for write
# config_file = self._getZopeConfigurationFile("etc/zope.conf", "w")
# config_file.write("".join(new_file_list))
# config_file.close()
# return
#
# Library signature
......
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