Commit c5566856 authored by Ayush Tiwari's avatar Ayush Tiwari

ERP5 Activity Tool: Use unrestrcited method

parent c0f5a868
Pipeline #2314 skipped
......@@ -54,6 +54,7 @@ from zExceptions import ExceptionFormatter
from BTrees.OIBTree import OIBTree
from Zope2 import app
from Products.ERP5Type.UnrestrictedMethod import PrivilegedUser
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from zope.site.hooks import setSite
import transaction
from App.config import getConfiguration
......@@ -993,6 +994,7 @@ class ActivityTool (Folder, UniqueObject):
LOG('CMFActivity', INFO, "Shutdown: Activities finished.")
security.declareProtected(CMFCorePermissions.ManagePortal, 'process_timer')
@UnrestrictedMethod
def process_timer(self, tick, interval, prev="", next=""):
"""
Call distribute() if we are the Distributing Node and call tic()
......@@ -1011,11 +1013,6 @@ class ActivityTool (Folder, UniqueObject):
self.setupCurrentSkin(self.REQUEST)
old_sm = getSecurityManager()
try:
# get owner of portal_catalog, so normally we should be able to
# have the permission to invoke all activities
user = self.portal_catalog.getWrappedOwner()
newSecurityManager(self.REQUEST, user)
currentNode = self.getCurrentNode()
self.registerNode(currentNode)
processing_node_list = self.getNodeList(role=ROLE_PROCESSING)
......
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