Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
bd4ad985
Commit
bd4ad985
authored
Dec 31, 1997
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Security update
parent
01680670
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
lib/python/Products/MailHost/MailHost.py
lib/python/Products/MailHost/MailHost.py
+20
-14
lib/python/Products/MailHost/manageMailHost.dtml
lib/python/Products/MailHost/manageMailHost.dtml
+0
-1
No files found.
lib/python/Products/MailHost/MailHost.py
View file @
bd4ad985
...
@@ -7,23 +7,21 @@ import Globals
...
@@ -7,23 +7,21 @@ import Globals
from
Scheduler.OneTimeEvent
import
OneTimeEvent
from
Scheduler.OneTimeEvent
import
OneTimeEvent
from
ImageFile
import
ImageFile
from
ImageFile
import
ImageFile
#$Id: MailHost.py,v 1.2
1 1997/12/19 21:46:37 jeffrey
Exp $
#$Id: MailHost.py,v 1.2
2 1997/12/31 21:15:19 brian
Exp $
__version__
=
"$Revision: 1.2
1
$"
[
11
:
-
2
]
__version__
=
"$Revision: 1.2
2
$"
[
11
:
-
2
]
smtpError
=
"SMTP Error"
smtpError
=
"SMTP Error"
MailHostError
=
"MailHost Error"
MailHostError
=
"MailHost Error"
addForm
=
HTMLFile
(
'addMailHost_form'
,
globals
(),
localhost
=
gethostname
())
addForm
=
HTMLFile
(
'addMailHost_form'
,
globals
(),
localhost
=
gethostname
())
def
add
(
self
,
id
,
title
=
''
,
smtp_host
=
None
,
def
add
(
self
,
id
,
title
=
''
,
smtp_host
=
None
,
localhost
=
'localhost'
,
smtp_port
=
25
,
acl_type
=
'A'
,
acl_roles
=
[],
localhost
=
'localhost'
,
smtp_port
=
25
,
REQUEST
=
None
):
REQUEST
=
None
):
' add a MailHost into the system '
' add a MailHost into the system '
i
=
MailHost
()
#create new mail host
i
=
MailHost
()
#create new mail host
i
.
id
=
id
#give it id
i
.
id
=
id
#give it id
i
.
title
=
title
#title
i
.
title
=
title
#title
i
.
_init
(
localHost
=
localhost
,
smtpHost
=
smtp_host
,
smtpPort
=
smtp_port
)
i
.
_init
(
localHost
=
localhost
,
smtpHost
=
smtp_host
,
smtpPort
=
smtp_port
)
i
.
_setRoles
(
acl_type
,
acl_roles
)
self
.
_setObject
(
id
,
i
)
#register it
self
.
_setObject
(
id
,
i
)
#register it
return
self
.
manage_main
(
self
,
REQUEST
)
#and whatever this does.. :
)
if
REQUEST
:
return
self
.
manage_main
(
self
,
REQUEST
)
class
MailHost
(
Persistent
,
Acquisition
.
Implicit
,
OFS
.
SimpleItem
.
Item
,
class
MailHost
(
Persistent
,
Acquisition
.
Implicit
,
OFS
.
SimpleItem
.
Item
,
...
@@ -38,13 +36,20 @@ class MailHost(Persistent, Acquisition.Implicit, OFS.SimpleItem.Item,
...
@@ -38,13 +36,20 @@ class MailHost(Persistent, Acquisition.Implicit, OFS.SimpleItem.Item,
'action'
:
'manage_main'
,
'target'
:
'manage_main'
,
'action'
:
'manage_main'
,
'target'
:
'manage_main'
,
},
},
{
'icon'
:
''
,
'label'
:
'Security'
,
{
'icon'
:
''
,
'label'
:
'Security'
,
'action'
:
'manage_rolesForm'
,
'target'
:
'manage_main'
,
'action'
:
'manage_access'
,
'target'
:
'manage_main'
,
},
{
'icon'
:
''
,
'label'
:
'Undo'
,
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
,
},
},
)
)
__ac_permissions__
=
(
(
'View management screens'
,
[
'manage'
,
'manage_tabs'
]),
(
'Change permissions'
,
[
'manage_access'
]),
(
'Change configuration'
,
[
'manage_makeChanges'
]),
(
'Use mailhost services'
,[
''
]),
)
__ac_types__
=
((
'Full Access'
,
map
(
lambda
x
:
x
[
0
],
__ac_permissions__
)),
)
def
__init__
(
self
):
def
__init__
(
self
):
'nothing yet'
'nothing yet'
...
@@ -56,15 +61,13 @@ class MailHost(Persistent, Acquisition.Implicit, OFS.SimpleItem.Item,
...
@@ -56,15 +61,13 @@ class MailHost(Persistent, Acquisition.Implicit, OFS.SimpleItem.Item,
self
.
smtpPort
=
smtpPort
self
.
smtpPort
=
smtpPort
self
.
sentMessages
=
0
self
.
sentMessages
=
0
def
manage_makeChanges
(
self
,
title
,
localHost
,
smtpHost
,
smtpPort
,
def
manage_makeChanges
(
self
,
title
,
localHost
,
smtpHost
,
smtpPort
,
REQUEST
=
None
):
acl_type
=
'A'
,
acl_roles
=
[],
REQUEST
=
None
):
'make the changes'
'make the changes'
self
.
title
=
title
self
.
title
=
title
self
.
localHost
=
localHost
self
.
localHost
=
localHost
self
.
smtpHost
=
smtpHost
self
.
smtpHost
=
smtpHost
self
.
smtpPort
=
smtpPort
self
.
smtpPort
=
smtpPort
self
.
_setRoles
(
acl_type
,
acl_roles
)
if
REQUEST
:
return
MessageDialog
(
return
MessageDialog
(
title
=
'Changed %s'
%
self
.
__name__
,
title
=
'Changed %s'
%
self
.
__name__
,
message
=
'%s has been updated'
%
self
.
id
,
message
=
'%s has been updated'
%
self
.
id
,
action
=
REQUEST
[
'URL2'
]
+
'/manage_main'
,
action
=
REQUEST
[
'URL2'
]
+
'/manage_main'
,
...
@@ -226,6 +229,9 @@ def decapitate(message, **kw):
...
@@ -226,6 +229,9 @@ def decapitate(message, **kw):
#$Log: MailHost.py,v $
#$Log: MailHost.py,v $
#Revision 1.22 1997/12/31 21:15:19 brian
#Security update
#
#Revision 1.21 1997/12/19 21:46:37 jeffrey
#Revision 1.21 1997/12/19 21:46:37 jeffrey
#fixees
#fixees
#
#
...
...
lib/python/Products/MailHost/manageMailHost.dtml
View file @
bd4ad985
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
<INPUT TYPE="TEXT" NAME="smtpPort:int" SIZE="4" VALUE="<!--#var smtpPort-->">
<INPUT TYPE="TEXT" NAME="smtpPort:int" SIZE="4" VALUE="<!--#var smtpPort-->">
</TD>
</TD>
</TR>
</TR>
<!--#var smallRolesWidget-->
<TR VALIGN="TOP">
<TR VALIGN="TOP">
<TD></TD>
<TD></TD>
<TD><BR><INPUT TYPE="SUBMIT" VALUE="Change"></TD>
<TD><BR><INPUT TYPE="SUBMIT" VALUE="Change"></TD>
...
...
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