Commit e9e1c06c authored by 's avatar

Added default __roles__ of None, custom roles form

parent cf2f4fab
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
__doc__='''Application support __doc__='''Application support
$Id: Application.py,v 1.13 1997/09/24 22:16:43 brian Exp $''' $Id: Application.py,v 1.14 1997/09/25 14:04:56 brian Exp $'''
__version__='$Revision: 1.13 $'[11:-2] __version__='$Revision: 1.14 $'[11:-2]
import Globals,Folder,regex import Globals,Folder,regex
...@@ -21,9 +21,10 @@ from AccessControl.User import UserFolder ...@@ -21,9 +21,10 @@ from AccessControl.User import UserFolder
class Application(Folder.Folder): class Application(Folder.Folder):
web__form__method='GET' title ='Principia'
title='Principia'
id =title id =title
__roles__=None
web__form__method='GET'
manage_options=( manage_options=(
{'icon':'OFS/Folder_icon.gif', 'label':'Contents', {'icon':'OFS/Folder_icon.gif', 'label':'Contents',
...@@ -40,6 +41,8 @@ class Application(Folder.Folder): ...@@ -40,6 +41,8 @@ class Application(Folder.Folder):
# 'action':'manage_help', 'target':'_new'}, # 'action':'manage_help', 'target':'_new'},
) )
manage_rolesForm=Globals.HTMLFile('OFS/rolesForm')
_reserved_names=('standard_html_header', _reserved_names=('standard_html_header',
'standard_html_footer', 'standard_html_footer',
'acl_users') 'acl_users')
...@@ -56,8 +59,6 @@ class Application(Folder.Folder): ...@@ -56,8 +59,6 @@ class Application(Folder.Folder):
'</BODY></HTML>') '</BODY></HTML>')
self._setObject('acl_users', self.__allow_groups__) self._setObject('acl_users', self.__allow_groups__)
def folderClass(self): return Folder.Folder def folderClass(self): return Folder.Folder
def __class_init__(self): pass def __class_init__(self): pass
...@@ -165,6 +166,9 @@ if __name__ == "__main__": main() ...@@ -165,6 +166,9 @@ if __name__ == "__main__": main()
############################################################################## ##############################################################################
# #
# $Log: Application.py,v $ # $Log: Application.py,v $
# Revision 1.14 1997/09/25 14:04:56 brian
# Added default __roles__ of None, custom roles form
#
# Revision 1.13 1997/09/24 22:16:43 brian # Revision 1.13 1997/09/24 22:16:43 brian
# Style update # Style update
# #
......
...@@ -10,4 +10,5 @@ ...@@ -10,4 +10,5 @@
# install imageEdit.dtml # install imageEdit.dtml
# install main.dtml # install main.dtml
# install properties.dtml # install properties.dtml
# install rolesForm.dtml
# install www www/%(package)s # install www www/%(package)s
<HTML>
<HEAD>
<TITLE>Access Control</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<H2>Access Control</H2>
<P>
You may restrict access to <EM><!--#var title--></EM> using the form
below. To add or remove roles, select or deselect
the desired role names and click &quot;Change&quot;.
<P>
<FORM ACTION="<!--#var PARENT_URL-->/manage_editRoles" METHOD="POST">
<TABLE>
<TR>
<TD VALIGN="TOP">
<INPUT TYPE="RADIO" NAME="acl_type" VALUE="E"<!--#var aclEChecked-->>
Allow users with selected roles
<BR>
<INPUT TYPE="RADIO" NAME="acl_type" VALUE="P"<!--#var aclPChecked-->>
Allow all users
</TD>
<TD VALIGN="TOP">
<SELECT NAME="acl_roles:list" SIZE="4" MULTIPLE>
<!--#in selectedRoles-->
<!--#var sequence-item-->
<!--#/in selectedRoles-->
</SELECT>
<BR>
<INPUT TYPE="SUBMIT" VALUE="Change">
</TD>
</TR>
</TABLE>
</FORM>
<P>
<FORM ACTION="<!--#var PARENT_URL-->/manage_addRole" METHOD="POST">
To add a new, user-defined role to this object, enter the name of
the new role and click &quot;Add&quot;.
<BR>
<INPUT TYPE="TEXT" NAME="role" SIZE="20">
<BR>
<INPUT TYPE="SUBMIT" VALUE=" Add ">
</FORM>
</BODY>
</HTML>
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