Commit 1159afcd authored by 's avatar

Added security info

parent bd3b3e48
......@@ -11,8 +11,8 @@
__doc__='''Application support
$Id: Application.py,v 1.33 1997/12/19 19:11:15 jim Exp $'''
__version__='$Revision: 1.33 $'[11:-2]
$Id: Application.py,v 1.34 1997/12/31 16:53:41 brian Exp $'''
__version__='$Revision: 1.34 $'[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
#
......
"""Document object"""
__version__='$Revision: 1.34 $'[11:-2]
__version__='$Revision: 1.35 $'[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 Screens', ['manage','manage_tabs','manage_uploadForm']),
('Change Permissions', ['manage_access']),
('Change/Upload Data', ['manage_edit','manage_upload','PUT']),
('View management screens', ['manage','manage_tabs','manage_uploadForm']),
('Change permissions', ['manage_access']),
('Change/upload data', ['manage_edit','manage_upload','PUT']),
('View', ['',]),
)
......
"""Image object"""
__version__='$Revision: 1.18 $'[11:-2]
__version__='$Revision: 1.19 $'[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 Screens', ['manage','manage_tabs','manage_uploadForm']),
('Change Permissions', ['manage_access']),
('Change/Upload Data', ['manage_edit','manage_upload','PUT']),
('View management screens', ['manage','manage_tabs','manage_uploadForm']),
('Change permissions', ['manage_access']),
('Change/upload data', ['manage_edit','manage_upload','PUT']),
('View', ['index_html',]),
)
......
......@@ -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 ***
#
......
......@@ -23,7 +23,6 @@
<INPUT TYPE="TEXT" NAME="title" SIZE="40">
</TD>
</TR>
<!--#var smallRolesWidget-->
<TR>
<TD></TD>
<TD>
......
......@@ -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>
......
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