Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
141
Merge Requests
141
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
eb3ebc37
Commit
eb3ebc37
authored
May 22, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AlarmTool: restore security manager after tic
parent
0edd03d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
product/ERP5/Tool/AlarmTool.py
product/ERP5/Tool/AlarmTool.py
+14
-9
No files found.
product/ERP5/Tool/AlarmTool.py
View file @
eb3ebc37
...
...
@@ -30,7 +30,8 @@ import time
import
threading
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
getSecurityManager
,
\
newSecurityManager
,
setSecurityManager
from
Products.ERP5Type.Globals
import
InitializeClass
,
DTMLFile
,
PersistentMapping
from
Products.ERP5Type.Core.Folder
import
Folder
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
...
...
@@ -128,6 +129,8 @@ class AlarmTool(TimerServiceMixin, BaseTool):
We will look at all alarms and see if they should be activated,
if so then we will activate them.
"""
security_manager
=
getSecurityManager
()
try
:
for
alarm
in
self
.
getAlarmList
(
to_active
=
1
):
if
alarm
is
not
None
:
user
=
alarm
.
getWrappedOwner
()
...
...
@@ -136,6 +139,8 @@ class AlarmTool(TimerServiceMixin, BaseTool):
# do nothing if already active, or not enabled
continue
alarm
.
activeSense
()
finally
:
setSecurityManager
(
security_manager
)
security
.
declarePrivate
(
'process_timer'
)
def
process_timer
(
self
,
interval
,
tick
,
prev
=
""
,
next
=
""
):
...
...
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