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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
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
...
@@ -30,7 +30,8 @@ import time
import
threading
import
threading
from
AccessControl
import
ClassSecurityInfo
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.Globals
import
InitializeClass
,
DTMLFile
,
PersistentMapping
from
Products.ERP5Type.Core.Folder
import
Folder
from
Products.ERP5Type.Core.Folder
import
Folder
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
...
@@ -128,6 +129,8 @@ class AlarmTool(TimerServiceMixin, BaseTool):
...
@@ -128,6 +129,8 @@ class AlarmTool(TimerServiceMixin, BaseTool):
We will look at all alarms and see if they should be activated,
We will look at all alarms and see if they should be activated,
if so then we will activate them.
if so then we will activate them.
"""
"""
security_manager
=
getSecurityManager
()
try
:
for
alarm
in
self
.
getAlarmList
(
to_active
=
1
):
for
alarm
in
self
.
getAlarmList
(
to_active
=
1
):
if
alarm
is
not
None
:
if
alarm
is
not
None
:
user
=
alarm
.
getWrappedOwner
()
user
=
alarm
.
getWrappedOwner
()
...
@@ -136,6 +139,8 @@ class AlarmTool(TimerServiceMixin, BaseTool):
...
@@ -136,6 +139,8 @@ class AlarmTool(TimerServiceMixin, BaseTool):
# do nothing if already active, or not enabled
# do nothing if already active, or not enabled
continue
continue
alarm
.
activeSense
()
alarm
.
activeSense
()
finally
:
setSecurityManager
(
security_manager
)
security
.
declarePrivate
(
'process_timer'
)
security
.
declarePrivate
(
'process_timer'
)
def
process_timer
(
self
,
interval
,
tick
,
prev
=
""
,
next
=
""
):
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