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
1159afcd
Commit
1159afcd
authored
Dec 31, 1997
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added security info
parent
bd3b3e48
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
40 deletions
+55
-40
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+30
-27
lib/python/OFS/Document.py
lib/python/OFS/Document.py
+4
-4
lib/python/OFS/Image.py
lib/python/OFS/Image.py
+4
-4
lib/python/OFS/Session.py
lib/python/OFS/Session.py
+17
-3
lib/python/OFS/sessionAdd.dtml
lib/python/OFS/sessionAdd.dtml
+0
-1
lib/python/OFS/sessionEdit.dtml
lib/python/OFS/sessionEdit.dtml
+0
-1
No files found.
lib/python/OFS/Application.py
View file @
1159afcd
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
__doc__
=
'''Application support
__doc__
=
'''Application support
$Id: Application.py,v 1.3
3 1997/12/19 19:11:15 jim
Exp $'''
$Id: Application.py,v 1.3
4 1997/12/31 16:53:41 brian
Exp $'''
__version__
=
'$Revision: 1.3
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
4
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
import
Globals
,
Folder
,
os
,
regex
,
sys
...
@@ -63,15 +63,15 @@ class Application(Folder.Folder):
...
@@ -63,15 +63,15 @@ class Application(Folder.Folder):
'action'
:
'manage_main'
,
'target'
:
'manage_main'
},
'action'
:
'manage_main'
,
'target'
:
'manage_main'
},
{
'icon'
:
'OFS/Properties_icon.gif'
,
'label'
:
'Properties'
,
{
'icon'
:
'OFS/Properties_icon.gif'
,
'label'
:
'Properties'
,
'action'
:
'manage_propertiesForm'
,
'target'
:
'manage_main'
},
'action'
:
'manage_propertiesForm'
,
'target'
:
'manage_main'
},
{
'icon'
:
'
AccessControl/AccessControl_icon.gif
'
,
'label'
:
'Security'
,
{
'icon'
:
''
,
'label'
:
'Security'
,
'action'
:
'manage_
rolesForm
'
,
'target'
:
'manage_main'
},
'action'
:
'manage_
access
'
,
'target'
:
'manage_main'
},
{
'icon'
:
'App/undo_icon.gif'
,
'label'
:
'Undo'
,
{
'icon'
:
'App/undo_icon.gif'
,
'label'
:
'Undo'
,
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
},
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
},
# {'icon':'OFS/Help_icon.gif', 'label':'Help',
# {'icon':'OFS/Help_icon.gif', 'label':'Help',
# 'action':'manage_help', 'target':'_new'},
# 'action':'manage_help', 'target':'_new'},
)
)
manage_rolesForm
=
Globals
.
HTMLFile
(
'rolesForm'
,
globals
())
#
manage_rolesForm=Globals.HTMLFile('rolesForm', globals())
_reserved_names
=
(
'standard_html_header'
,
_reserved_names
=
(
'standard_html_header'
,
'standard_html_footer'
,
'standard_html_footer'
,
...
@@ -81,7 +81,7 @@ class Application(Folder.Folder):
...
@@ -81,7 +81,7 @@ class Application(Folder.Folder):
def
_init
(
self
):
def
_init
(
self
):
# Initialize users
# Initialize users
self
.
__allow_groups__
=
UserFolder
()
self
.
__allow_groups__
=
UserFolder
()
self
.
__allow_groups__
.
_init
()
#
self.__allow_groups__._init()
self
.
_setObject
(
'acl_users'
,
self
.
__allow_groups__
)
self
.
_setObject
(
'acl_users'
,
self
.
__allow_groups__
)
# Initialize control panel
# Initialize control panel
...
@@ -133,29 +133,29 @@ class Application(Folder.Folder):
...
@@ -133,29 +133,29 @@ class Application(Folder.Folder):
return
DateTime
()
return
DateTime
()
def
manage_addRole
(
self
,
REQUEST
,
role
):
#
def manage_addRole(self,REQUEST,role):
""" """
#
""" """
roles
=
list
(
self
.
__defined_roles__
)
#
roles=list(self.__defined_roles__)
if
role
not
in
roles
:
#
if role not in roles:
roles
.
append
(
role
)
#
roles.append(role)
roles
.
sort
()
#
roles.sort()
self
.
__defined_roles__
=
tuple
(
roles
)
#
self.__defined_roles__=tuple(roles)
try
:
roles
=
self
.
__roles__
#
try: roles=self.__roles__
except
:
roles
=
[]
#
except: roles=[]
if
roles
is
None
:
roles
=
[]
#
if roles is None: roles=[]
roles
.
append
(
role
)
#
roles.append(role)
self
.
__roles__
=
roles
#
self.__roles__=roles
return
self
.
manage_rolesForm
(
self
,
REQUEST
)
#
return self.manage_rolesForm(self, REQUEST)
def
manage_deleteRole
(
self
,
REQUEST
,
role
):
#
def manage_deleteRole(self,REQUEST,role):
""" """
#
""" """
roles
=
list
(
self
.
__defined_roles__
)
#
roles=list(self.__defined_roles__)
if
role
in
roles
:
#
if role in roles:
del
roles
[
roles
.
index
(
role
)]
#
del roles[roles.index(role)]
self
.
__defined_roles__
=
tuple
(
roles
)
#
self.__defined_roles__=tuple(roles)
def
validRoles
(
self
):
#
def validRoles(self):
return
self
.
__defined_roles__
#
return self.__defined_roles__
...
@@ -284,6 +284,9 @@ class Misc_:
...
@@ -284,6 +284,9 @@ class Misc_:
##############################################################################
##############################################################################
#
#
# $Log: Application.py,v $
# $Log: Application.py,v $
# Revision 1.34 1997/12/31 16:53:41 brian
# Added security info
#
# Revision 1.33 1997/12/19 19:11:15 jim
# Revision 1.33 1997/12/19 19:11:15 jim
# updated icon management strategy
# updated icon management strategy
#
#
...
...
lib/python/OFS/Document.py
View file @
1159afcd
"""Document object"""
"""Document object"""
__version__
=
'$Revision: 1.3
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
5
$'
[
11
:
-
2
]
from
Globals
import
HTML
,
HTMLFile
from
Globals
import
HTML
,
HTMLFile
from
string
import
join
,
split
,
strip
,
rfind
,
atoi
from
string
import
join
,
split
,
strip
,
rfind
,
atoi
...
@@ -36,9 +36,9 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
...
@@ -36,9 +36,9 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
)
)
__ac_permissions__
=
(
__ac_permissions__
=
(
(
'View
Management S
creens'
,
[
'manage'
,
'manage_tabs'
,
'manage_uploadForm'
]),
(
'View
management s
creens'
,
[
'manage'
,
'manage_tabs'
,
'manage_uploadForm'
]),
(
'Change
P
ermissions'
,
[
'manage_access'
]),
(
'Change
p
ermissions'
,
[
'manage_access'
]),
(
'Change/
Upload D
ata'
,
[
'manage_edit'
,
'manage_upload'
,
'PUT'
]),
(
'Change/
upload d
ata'
,
[
'manage_edit'
,
'manage_upload'
,
'PUT'
]),
(
'View'
,
[
''
,]),
(
'View'
,
[
''
,]),
)
)
...
...
lib/python/OFS/Image.py
View file @
1159afcd
"""Image object"""
"""Image object"""
__version__
=
'$Revision: 1.1
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
9
$'
[
11
:
-
2
]
from
Persistence
import
Persistent
from
Persistence
import
Persistent
from
Globals
import
HTMLFile
from
Globals
import
HTMLFile
...
@@ -37,9 +37,9 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
...
@@ -37,9 +37,9 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
)
)
__ac_permissions__
=
(
__ac_permissions__
=
(
(
'View
Management S
creens'
,
[
'manage'
,
'manage_tabs'
,
'manage_uploadForm'
]),
(
'View
management s
creens'
,
[
'manage'
,
'manage_tabs'
,
'manage_uploadForm'
]),
(
'Change
P
ermissions'
,
[
'manage_access'
]),
(
'Change
p
ermissions'
,
[
'manage_access'
]),
(
'Change/
Upload D
ata'
,
[
'manage_edit'
,
'manage_upload'
,
'PUT'
]),
(
'Change/
upload d
ata'
,
[
'manage_edit'
,
'manage_upload'
,
'PUT'
]),
(
'View'
,
[
'index_html'
,]),
(
'View'
,
[
'index_html'
,]),
)
)
...
...
lib/python/OFS/Session.py
View file @
1159afcd
...
@@ -12,7 +12,7 @@ __doc__='''A drop-in object that represents a session.
...
@@ -12,7 +12,7 @@ __doc__='''A drop-in object that represents a session.
$Id: Session.py,v 1.
8 1997/12/18 16:42:02 jeffrey
Exp $'''
$Id: Session.py,v 1.
9 1997/12/31 16:53:42 brian
Exp $'''
import
time
,
SimpleItem
,
AccessControl
.
Role
,
Persistence
,
Acquisition
,
Globals
import
time
,
SimpleItem
,
AccessControl
.
Role
,
Persistence
,
Acquisition
,
Globals
from
string
import
rfind
from
string
import
rfind
...
@@ -57,13 +57,24 @@ class Session(Persistence.Persistent,
...
@@ -57,13 +57,24 @@ class Session(Persistence.Persistent,
'action'
:
'manage_propertiesForm'
,
'target'
:
'manage_main'
,
'action'
:
'manage_propertiesForm'
,
'target'
:
'manage_main'
,
},
},
{
'icon'
:
''
,
'label'
:
'Security'
,
{
'icon'
:
''
,
'label'
:
'Security'
,
'action'
:
'manage_
rolesForm
'
,
'target'
:
'manage_main'
,
'action'
:
'manage_
access
'
,
'target'
:
'manage_main'
,
},
},
{
'icon'
:
''
,
'label'
:
'Undo'
,
{
'icon'
:
''
,
'label'
:
'Undo'
,
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
,
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
,
},
},
)
)
__ac_permissions__
=
(
(
'View management screens'
,
[
'manage'
,
'manage_tabs'
,
'index_html'
]),
(
'Change permissions'
,
[
'manage_access'
]),
(
'Edit session'
,
[
'manage_edit'
]),
(
'Join/leave session'
[
'enter'
,
'leave'
,
'leave_another'
]),
(
'Save/discard session'
,
[
'save'
,
'discard'
]),
)
__ac_types__
=
((
'Full Access'
,
map
(
lambda
x
:
x
[
0
],
__ac_permissions__
)),
)
def
_init
(
self
,
id
,
title
,
REQUEST
):
def
_init
(
self
,
id
,
title
,
REQUEST
):
self
.
id
=
id
self
.
id
=
id
self
.
title
=
title
self
.
title
=
title
...
@@ -125,7 +136,7 @@ class Session(Persistence.Persistent,
...
@@ -125,7 +136,7 @@ class Session(Persistence.Persistent,
def
nonempty
(
self
):
return
Globals
.
SessionBase
[
self
.
cookie
].
nonempty
()
def
nonempty
(
self
):
return
Globals
.
SessionBase
[
self
.
cookie
].
nonempty
()
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
...
@@ -133,6 +144,9 @@ __version__='$Revision: 1.8 $'[11:-2]
...
@@ -133,6 +144,9 @@ __version__='$Revision: 1.8 $'[11:-2]
##############################################################################
##############################################################################
#
#
# $Log: Session.py,v $
# $Log: Session.py,v $
# Revision 1.9 1997/12/31 16:53:42 brian
# Added security info
#
# Revision 1.8 1997/12/18 16:42:02 jeffrey
# Revision 1.8 1997/12/18 16:42:02 jeffrey
# *** empty log message ***
# *** empty log message ***
#
#
...
...
lib/python/OFS/sessionAdd.dtml
View file @
1159afcd
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
<INPUT TYPE="TEXT" NAME="title" SIZE="40">
<INPUT TYPE="TEXT" NAME="title" SIZE="40">
</TD>
</TD>
</TR>
</TR>
<!--#var smallRolesWidget-->
<TR>
<TR>
<TD></TD>
<TD></TD>
<TD>
<TD>
...
...
lib/python/OFS/sessionEdit.dtml
View file @
1159afcd
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
<INPUT TYPE="TEXT" NAME="title" SIZE="40" VALUE="<!--#var title-->">
<INPUT TYPE="TEXT" NAME="title" SIZE="40" VALUE="<!--#var title-->">
</TD>
</TD>
</TR>
</TR>
<!--#var smallRolesWidget-->
<TR>
<TR>
<TD></TD>
<TD></TD>
<TD><BR><INPUT TYPE="SUBMIT" VALUE="Edit"></TD>
<TD><BR><INPUT TYPE="SUBMIT" VALUE="Edit"></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