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
Hide 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 @@
__doc__
=
'''Application support
$Id: Application.py,v 1.3
3 1997/12/19 19:11:15 jim
Exp $'''
__version__
=
'$Revision: 1.3
3
$'
[
11
:
-
2
]
$Id: Application.py,v 1.3
4 1997/12/31 16:53:41 brian
Exp $'''
__version__
=
'$Revision: 1.3
4
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
...
...
@@ -63,15 +63,15 @@ class Application(Folder.Folder):
'action'
:
'manage_main'
,
'target'
:
'manage_main'
},
{
'icon'
:
'OFS/Properties_icon.gif'
,
'label'
:
'Properties'
,
'action'
:
'manage_propertiesForm'
,
'target'
:
'manage_main'
},
{
'icon'
:
'
AccessControl/AccessControl_icon.gif
'
,
'label'
:
'Security'
,
'action'
:
'manage_
rolesForm
'
,
'target'
:
'manage_main'
},
{
'icon'
:
''
,
'label'
:
'Security'
,
'action'
:
'manage_
access
'
,
'target'
:
'manage_main'
},
{
'icon'
:
'App/undo_icon.gif'
,
'label'
:
'Undo'
,
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
},
# {'icon':'OFS/Help_icon.gif', 'label':'Help',
# 'action':'manage_help', 'target':'_new'},
)
manage_rolesForm
=
Globals
.
HTMLFile
(
'rolesForm'
,
globals
())
#
manage_rolesForm=Globals.HTMLFile('rolesForm', globals())
_reserved_names
=
(
'standard_html_header'
,
'standard_html_footer'
,
...
...
@@ -81,7 +81,7 @@ class Application(Folder.Folder):
def
_init
(
self
):
# Initialize users
self
.
__allow_groups__
=
UserFolder
()
self
.
__allow_groups__
.
_init
()
#
self.__allow_groups__._init()
self
.
_setObject
(
'acl_users'
,
self
.
__allow_groups__
)
# Initialize control panel
...
...
@@ -133,29 +133,29 @@ class Application(Folder.Folder):
return
DateTime
()
def
manage_addRole
(
self
,
REQUEST
,
role
):
""" """
roles
=
list
(
self
.
__defined_roles__
)
if
role
not
in
roles
:
roles
.
append
(
role
)
roles
.
sort
()
self
.
__defined_roles__
=
tuple
(
roles
)
try
:
roles
=
self
.
__roles__
except
:
roles
=
[]
if
roles
is
None
:
roles
=
[]
roles
.
append
(
role
)
self
.
__roles__
=
roles
return
self
.
manage_rolesForm
(
self
,
REQUEST
)
#
def manage_addRole(self,REQUEST,role):
#
""" """
#
roles=list(self.__defined_roles__)
#
if role not in roles:
#
roles.append(role)
#
roles.sort()
#
self.__defined_roles__=tuple(roles)
#
try: roles=self.__roles__
#
except: roles=[]
#
if roles is None: roles=[]
#
roles.append(role)
#
self.__roles__=roles
#
return self.manage_rolesForm(self, REQUEST)
def
manage_deleteRole
(
self
,
REQUEST
,
role
):
""" """
roles
=
list
(
self
.
__defined_roles__
)
if
role
in
roles
:
del
roles
[
roles
.
index
(
role
)]
self
.
__defined_roles__
=
tuple
(
roles
)
#
def manage_deleteRole(self,REQUEST,role):
#
""" """
#
roles=list(self.__defined_roles__)
#
if role in roles:
#
del roles[roles.index(role)]
#
self.__defined_roles__=tuple(roles)
def
validRoles
(
self
):
return
self
.
__defined_roles__
#
def validRoles(self):
#
return self.__defined_roles__
...
...
@@ -284,6 +284,9 @@ class Misc_:
##############################################################################
#
# $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
# updated icon management strategy
#
...
...
lib/python/OFS/Document.py
View file @
1159afcd
"""Document object"""
__version__
=
'$Revision: 1.3
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
5
$'
[
11
:
-
2
]
from
Globals
import
HTML
,
HTMLFile
from
string
import
join
,
split
,
strip
,
rfind
,
atoi
...
...
@@ -36,9 +36,9 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
)
__ac_permissions__
=
(
(
'View
Management S
creens'
,
[
'manage'
,
'manage_tabs'
,
'manage_uploadForm'
]),
(
'Change
P
ermissions'
,
[
'manage_access'
]),
(
'Change/
Upload D
ata'
,
[
'manage_edit'
,
'manage_upload'
,
'PUT'
]),
(
'View
management s
creens'
,
[
'manage'
,
'manage_tabs'
,
'manage_uploadForm'
]),
(
'Change
p
ermissions'
,
[
'manage_access'
]),
(
'Change/
upload d
ata'
,
[
'manage_edit'
,
'manage_upload'
,
'PUT'
]),
(
'View'
,
[
''
,]),
)
...
...
lib/python/OFS/Image.py
View file @
1159afcd
"""Image object"""
__version__
=
'$Revision: 1.1
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
9
$'
[
11
:
-
2
]
from
Persistence
import
Persistent
from
Globals
import
HTMLFile
...
...
@@ -37,9 +37,9 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
)
__ac_permissions__
=
(
(
'View
Management S
creens'
,
[
'manage'
,
'manage_tabs'
,
'manage_uploadForm'
]),
(
'Change
P
ermissions'
,
[
'manage_access'
]),
(
'Change/
Upload D
ata'
,
[
'manage_edit'
,
'manage_upload'
,
'PUT'
]),
(
'View
management s
creens'
,
[
'manage'
,
'manage_tabs'
,
'manage_uploadForm'
]),
(
'Change
p
ermissions'
,
[
'manage_access'
]),
(
'Change/
upload d
ata'
,
[
'manage_edit'
,
'manage_upload'
,
'PUT'
]),
(
'View'
,
[
'index_html'
,]),
)
...
...
lib/python/OFS/Session.py
View file @
1159afcd
...
...
@@ -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
from
string
import
rfind
...
...
@@ -57,13 +57,24 @@ class Session(Persistence.Persistent,
'action'
:
'manage_propertiesForm'
,
'target'
:
'manage_main'
,
},
{
'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'
,
'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
):
self
.
id
=
id
self
.
title
=
title
...
...
@@ -125,7 +136,7 @@ class Session(Persistence.Persistent,
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]
##############################################################################
#
# $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
# *** empty log message ***
#
...
...
lib/python/OFS/sessionAdd.dtml
View file @
1159afcd
...
...
@@ -23,7 +23,6 @@
<INPUT TYPE="TEXT" NAME="title" SIZE="40">
</TD>
</TR>
<!--#var smallRolesWidget-->
<TR>
<TD></TD>
<TD>
...
...
lib/python/OFS/sessionEdit.dtml
View file @
1159afcd
...
...
@@ -23,7 +23,6 @@
<INPUT TYPE="TEXT" NAME="title" SIZE="40" VALUE="<!--#var title-->">
</TD>
</TR>
<!--#var smallRolesWidget-->
<TR>
<TD></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