Commit 1159afcd authored by 's avatar

Added security info

parent bd3b3e48
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
__doc__='''Application support __doc__='''Application support
$Id: Application.py,v 1.33 1997/12/19 19:11:15 jim Exp $''' $Id: Application.py,v 1.34 1997/12/31 16:53:41 brian Exp $'''
__version__='$Revision: 1.33 $'[11:-2] __version__='$Revision: 1.34 $'[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
# #
......
"""Document object""" """Document object"""
__version__='$Revision: 1.34 $'[11:-2] __version__='$Revision: 1.35 $'[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 Screens', ['manage','manage_tabs','manage_uploadForm']), ('View management screens', ['manage','manage_tabs','manage_uploadForm']),
('Change Permissions', ['manage_access']), ('Change permissions', ['manage_access']),
('Change/Upload Data', ['manage_edit','manage_upload','PUT']), ('Change/upload data', ['manage_edit','manage_upload','PUT']),
('View', ['',]), ('View', ['',]),
) )
......
"""Image object""" """Image object"""
__version__='$Revision: 1.18 $'[11:-2] __version__='$Revision: 1.19 $'[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 Screens', ['manage','manage_tabs','manage_uploadForm']), ('View management screens', ['manage','manage_tabs','manage_uploadForm']),
('Change Permissions', ['manage_access']), ('Change permissions', ['manage_access']),
('Change/Upload Data', ['manage_edit','manage_upload','PUT']), ('Change/upload data', ['manage_edit','manage_upload','PUT']),
('View', ['index_html',]), ('View', ['index_html',]),
) )
......
...@@ -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 ***
# #
......
...@@ -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>
......
...@@ -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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment