Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
c5566856
Commit
c5566856
authored
Sep 06, 2016
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5 Activity Tool: Use unrestrcited method
parent
c0f5a868
Pipeline
#2314
skipped
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
product/CMFActivity/ActivityTool.py
product/CMFActivity/ActivityTool.py
+2
-5
No files found.
product/CMFActivity/ActivityTool.py
View file @
c5566856
...
@@ -54,6 +54,7 @@ from zExceptions import ExceptionFormatter
...
@@ -54,6 +54,7 @@ from zExceptions import ExceptionFormatter
from
BTrees.OIBTree
import
OIBTree
from
BTrees.OIBTree
import
OIBTree
from
Zope2
import
app
from
Zope2
import
app
from
Products.ERP5Type.UnrestrictedMethod
import
PrivilegedUser
from
Products.ERP5Type.UnrestrictedMethod
import
PrivilegedUser
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
zope.site.hooks
import
setSite
from
zope.site.hooks
import
setSite
import
transaction
import
transaction
from
App.config
import
getConfiguration
from
App.config
import
getConfiguration
...
@@ -993,6 +994,7 @@ class ActivityTool (Folder, UniqueObject):
...
@@ -993,6 +994,7 @@ class ActivityTool (Folder, UniqueObject):
LOG
(
'CMFActivity'
,
INFO
,
"Shutdown: Activities finished."
)
LOG
(
'CMFActivity'
,
INFO
,
"Shutdown: Activities finished."
)
security
.
declareProtected
(
CMFCorePermissions
.
ManagePortal
,
'process_timer'
)
security
.
declareProtected
(
CMFCorePermissions
.
ManagePortal
,
'process_timer'
)
@
UnrestrictedMethod
def
process_timer
(
self
,
tick
,
interval
,
prev
=
""
,
next
=
""
):
def
process_timer
(
self
,
tick
,
interval
,
prev
=
""
,
next
=
""
):
"""
"""
Call distribute() if we are the Distributing Node and call tic()
Call distribute() if we are the Distributing Node and call tic()
...
@@ -1011,11 +1013,6 @@ class ActivityTool (Folder, UniqueObject):
...
@@ -1011,11 +1013,6 @@ class ActivityTool (Folder, UniqueObject):
self
.
setupCurrentSkin
(
self
.
REQUEST
)
self
.
setupCurrentSkin
(
self
.
REQUEST
)
old_sm
=
getSecurityManager
()
old_sm
=
getSecurityManager
()
try
:
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
()
currentNode
=
self
.
getCurrentNode
()
self
.
registerNode
(
currentNode
)
self
.
registerNode
(
currentNode
)
processing_node_list
=
self
.
getNodeList
(
role
=
ROLE_PROCESSING
)
processing_node_list
=
self
.
getNodeList
(
role
=
ROLE_PROCESSING
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment