Commit 073114fd authored by adam's avatar adam

initial commit

parent 832f5c63
......@@ -2,28 +2,39 @@
<HTML lang="en">
<HEAD>
<TITLE>Security</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function selectAll(boxes)
{
for (i = 0; i < boxes.length; i++)
boxes[i].checked = true ;
}
function unselectAll()
{
for (i = 0; i < document.actions.length; i++)
document.actions.elements[i].checked = false ;
}
function returnAxis(arg)
{
for (i = 0; i < document.permissions.length; i++)
{
if (document.permissions.elements[i].name.charAt(1) == arg)
document.permissions.elements[i].checked = true ;
}
}
//-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<dtml-if manage_tabs>
<dtml-var manage_tabs>
</dtml-if manage_tabs>
<P>
The listing below shows the current security settings for this item.
Permissions are rows and roles are columns. Checkboxes are used to
indicate where roles are assigned permissions. You can also assign
<strong><a href="manage_listLocalRoles">local roles</a></strong> to
users, which give users extra roles in the context of this object and
its subobjects.
</P>
<P>
When a role is assigned to a permission, users with the given role
will be able to perform tasks associated with the permission on this
item. When the <EM>Acquire permission settings</EM> checkbox is selected
then the containing objects's permission settings are used. Note: the
acquired permission settings may be augmented by selecting Roles for
a permission in addition to selecting to acquire permissions.
</P>
<dtml-if "_['id'] != 'acl_users'">
<P>
......@@ -42,7 +53,10 @@ td {
</style>
<dtml-with expr="_.namespace(valid_roles=valid_roles())">
<FORM ACTION="manage_changePermissions" METHOD="POST">
<FORM name="permissions" ACTION="manage_changePermissions" METHOD="POST">
<TABLE CELLPADDING="4">
<TR>
<TD WIDTH="70%" VALIGN="TOP">
<TABLE>
<TR>
<dtml-unless isTopLevelPrincipiaApplicationObject>
......@@ -77,7 +91,13 @@ td {
</TR>
<dtml-in permission_settings mapping>
<dtml-if sequence-odd>
<TR>
</dtml-if>
<dtml-if sequence-even>
<TR BGCOLOR = "#DDDDDD">
</dtml-if>
<dtml-unless isTopLevelPrincipiaApplicationObject>
<TD ALIGN="CENTER">
<INPUT TYPE="checkbox" NAME="a<dtml-var sequence-index>"
......@@ -87,12 +107,13 @@ td {
<TD ALIGN="LEFT">
<A HREF="manage_permissionForm?permission_to_manage=<dtml-
var name url_quote>">
<dtml-var name></A>
<dtml-var name></A><!-- - <sm><a href="#" OnClick="returnAxis(<dtml-var sequence-index>); return false;">Select Roles for this Permission</a></sm> -->
</TD>
<dtml-in roles mapping>
<TD ALIGN="CENTER">
<INPUT TYPE="CHECKBOX" NAME="<dtml-var name>" <dtml-var checked>>
</TD>
</dtml-in>
</TR>
......@@ -107,6 +128,27 @@ td {
</TD>
</TR>
</TABLE>
</TD>
<TD VALIGN=TOP WIDTH="30%">
<P>
The listing below shows the current security settings for this item.
Permissions are rows and roles are columns. Checkboxes are used to
indicate where roles are assigned permissions. You can also assign
<strong><a href="manage_listLocalRoles">local roles</a></strong> to
users, which give users extra roles in the context of this object and
its subobjects.
</P>
<P>
When a role is assigned to a permission, users with the given role
will be able to perform tasks associated with the permission on this
item. When the <EM>Acquire permission settings</EM> checkbox is selected
then the containing objects's permission settings are used. Note: the
acquired permission settings may be augmented by selecting Roles for
a permission in addition to selecting to acquire permissions.
</P>
</TD>
</TR>
</TABLE>
</FORM>
</dtml-with>
......@@ -152,3 +194,7 @@ td {
</BODY>
</HTML>
......@@ -18,7 +18,7 @@
<strong>Local roles</strong> allow you to give particular users extra roles
in the context of this object, in addition to the roles they already have.
<dtml-if has_local_roles>
<br>
The following users have been given local roles. To modify the local roles
given to a particular user, click on the name of the user. To remove all
......
......@@ -382,11 +382,11 @@
''' #'
__rcs_id__='$Id: DT_In.py,v 1.40 2000/05/25 16:33:44 shane Exp $'
__version__='$Revision: 1.40 $'[11:-2]
__rcs_id__='$Id: DT_In.py,v 1.41 2000/12/18 20:45:01 adam Exp $'
__version__='$Revision: 1.41 $'[11:-2]
from DT_Util import ParseError, parse_params, name_param, str
from DT_Util import render_blocks, InstanceDict, ValidationError
from DT_Util import render_blocks, InstanceDict, ValidationError, VSEval, expr_globals
from string import find, atoi, join, split
import ts_regex
from DT_InSV import sequence_variables, opt
......@@ -408,6 +408,7 @@ class InClass:
expr=sort=batch=mapping=None
start_name_re=None
reverse=None
sort_expr=reverse_expr=None
def __init__(self, blocks):
tname, args, section = blocks[0]
......@@ -415,7 +416,7 @@ class InClass:
orphan='3',overlap='1',mapping=1,
skip_unauthorized=1,
previous=1, next=1, expr='', sort='',
reverse=1)
reverse=1, sort_expr='', reverse_expr='')
self.args=args
has_key=args.has_key
......@@ -423,6 +424,12 @@ class InClass:
self.sort=sort=args['sort']
if sort=='sequence-item': self.sort=''
if has_key('sort_expr'):
self.sort_expr=VSEval.Eval(args['sort_expr'], expr_globals)
if has_key('reverse_expr'):
self.reverse_expr=VSEval.Eval(args['reverse_expr'], expr_globals)
if has_key('reverse'):
self.reverse=args['reverse']
......@@ -484,15 +491,21 @@ class InClass:
raise 'InError', (
'Strings are not allowed as input to the in tag.')
section=self.section
params=self.args
mapping=self.mapping
if self.sort is not None:
if self.sort_expr is not None:
self.sort=self.sort_expr.eval(md)
sequence=self.sort_sequence(sequence)
elif self.sort is not None:
sequence=self.sort_sequence(sequence)
if self.reverse is not None:
if self.reverse_expr is not None and self.reverse_expr.eval(md):
sequence=self.reverse_sequence(sequence)
elif self.reverse is not None:
sequence=self.reverse_sequence(sequence)
next=previous=0
......@@ -644,10 +657,16 @@ class InClass:
section=self.section
mapping=self.mapping
if self.sort is not None:
if self.sort_expr is not None:
self.sort=self.sort_expr.eval(md)
sequence=self.sort_sequence(sequence)
elif self.sort is not None:
sequence=self.sort_sequence(sequence)
if self.reverse is not None:
if self.reverse_expr is not None and self.reverse_expr.eval(md):
sequence=self.reverse_sequence(sequence)
elif self.reverse is not None:
sequence=self.reverse_sequence(sequence)
vars=sequence_variables(sequence)
......
......@@ -6,24 +6,22 @@
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<dtml-var manage_tabs>
<P>
You can export Zope objects to a file in order to transfer
them to a different Zope installation. You can either choose
to download the export file to your local machine, or save it
in the &quot;var&quot; directory of your Zope installation
on the server.
</P>
<FORM ACTION="manage_exportObject" METHOD="POST">
<TABLE CELLSPACING="2">
<TR>
<TABLE CELLPADDING="4">
<TR>
<TD COLSPAN="2" BGCOLOR="#000099"></TD>
</TR>
<TR>
<TD WIDTH="70%" VALIGN="TOP">
<TABLE CELLSPACING="2">
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">Export object id</TH>
<TD ALIGH="LEFT" VALIGN="TOP">
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="id" SIZE="25" VALUE="<dtml-if ids><dtml-var
"ids[0]" html_quote></dtml-if>">
</TD>
</TR>
<TR>
</TR>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">Export to</TH>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="RADIO" NAME="download:int" VALUE="1">
......@@ -43,24 +41,27 @@ on the server.
<TD><INPUT TYPE="SUBMIT" VALUE="Export"></TD>
</TR>
</TABLE>
</TD>
<TD VALIGN=TOP WIDTH="30%">
<SM>You can export Zope objects to a file in order to transfer
them to a different Zope installation. You can either choose
to download the export file to your local machine, or save it
in the &quot;var&quot; directory of your Zope installation
on the server.</SM>
</TD>
</TR>
</TABLE>
</FORM>
<p>
You may import Zope objects which have been previously
exported to a file, by placing the file in the &quot;import&quot;
directory of your Zope installation on the server. You should create
the &quot;import&quot; directory in the root of your Zope installation
if it does not yet exist.
</p>
<p>
Note that by default, you will become the owner of the objects
that you are importing. If you wish the imported objects to retain
their existing ownership information, select "retain existing
ownership information".
</p>
<FORM ACTION="manage_importObject" METHOD="POST">
<TABLE CELLPADDING=2>
<TR>
<TD COLSPAN="2" BGCOLOR="#000099"></TD>
</TR>
<TR>
<TD WIDTH="70%" VALIGN="TOP">
<TABLE CELLSPACING="2">
<TR>
......@@ -87,6 +88,25 @@ ownership information".
</TD>
</TR>
</TABLE>
</TD>
<TD WIDTH="30%" VALIGN="TOP">
<SM>
<p>
You may import Zope objects which have been previously
exported to a file, by placing the file in the &quot;import&quot;
directory of your Zope installation on the server. You should create
the &quot;import&quot; directory in the root of your Zope installation
if it does not yet exist.
</p>
<p>
Note that by default, you will become the owner of the objects
that you are importing. If you wish the imported objects to retain
their existing ownership information, select "retain existing
ownership information".
</p>
</SM>
</TABLE>
</FORM>
</BODY>
</HTML>
......
......@@ -2,16 +2,66 @@
<HTML lang="en">
<HEAD>
<TITLE>Contents</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
isSelected = false;
function toggleSelect()
{
if (isSelected == false)
{
for (i = 0; i < document.objectItems.length; i++)
document.objectItems.elements[i].checked = true ;
isSelected = true;
return isSelected;
}
else
for (i = 0; i < document.objectItems.length; i++)
document.objectItems.elements[i].checked = false ;
isSelected = false;
return isSelected;
}
//-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<dtml-var manage_tabs>
<P>
<FORM ACTION="&dtml-URL1;" METHOD="POST">
<FORM ACTION="&dtml-URL1;" METHOD="POST" name="objectItems">
<dtml-if objectItems>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<dtml-in objectItems sort>
<dtml-unless skey>
<dtml-call expr="REQUEST.set('skey', 'id')">
</dtml-unless>
<dtml-unless rkey>
<dtml-call expr="REQUEST.set('rkey', '')">
</dtml-unless>
<TR>
<TD WIDTH = "2%" ALIGN="left">&nbsp;</TD>
<TD WIDTH = "4%" ALIGN="left"><a href="<dtml-var absolute_url>/manage_main?skey=meta_type<dtml-if "rkey == ''">&rkey=meta_type</dtml-if>">Type</TD>
<TD WIDTH = "50%" ALIGN="left"><a href="./manage_main?skey=id<dtml-if "rkey == ''">&rkey=id</dtml-if>">Id</a></TD>
<TD WIDTH = "15%" ALIGN="left"><a href="./manage_main?skey=get_size<dtml-if "rkey == ''">&rkey=get_size</dtml-if>">Size</a></TD>
<TD WIDTH = "29%" ALIGN="left"><a href="./manage_main?skey=bobobase_modification_time<dtml-if "rkey == ''">&rkey=bobobase_modification_time</dtml-if>">Last Modified</a></TD>
</TR>
<dtml-in objectItems sort_expr="skey" reverse_expr="rkey">
<dtml-if sequence-odd>
<TR>
</dtml-if>
<dtml-if sequence-even>
<TR BGCOLOR="#DDDDDD">
</dtml-if>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="16">
<INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="&dtml-sequence-key;">
</TD>
......@@ -37,6 +87,19 @@
</dtml-if>
</dtml-if>
</TD>
<dtml-with sequence-key>
<TD>
<dtml-if get_size>
<dtml-var get_size thousands_commas> bytes
<dtml-else>
&nbsp;
</dtml-if>
</TD>
<TD>
<dtml-var bobobase_modification_time fmt=mm>/<dtml-var bobobase_modification_time fmt=dd>/<dtml-var bobobase_modification_time fmt=yy>&nbsp;
<dtml-var bobobase_modification_time fmt=AMPMMinutes>
</TD>
</dtml-with>
</TR>
</dtml-in>
</TABLE>
......@@ -57,11 +120,21 @@
<INPUT TYPE="SUBMIT" NAME="manage_delObjects:method" VALUE="Delete">
</dtml-if>
<dtml-if "_.SecurityCheckPermission('Import/Export objects', this())">
<INPUT TYPE="SUBMIT" NAME="manage_importExportForm:method" VALUE="Export...">
<INPUT TYPE="SUBMIT" NAME="manage_importExportForm:method" VALUE="Import/Export...">
</dtml-if>
</TD>
</TR>
</TABLE>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING=2>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="16"></TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<FORM OnSubmit="return false;">
<Input type="submit" value="Unselect All" OnClick="toggleSelect(); return false">
</FORM>
</TD>
</TR>
</TABLE>
<dtml-else>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
......@@ -124,3 +197,6 @@ window.parent.update_menu();
</BODY>
</HTML>
......@@ -5,27 +5,22 @@
</head>
<body bgcolor="#FFFFFF" link="#000099" vlink="#555555">
<dtml-var manage_tabs>
<dtml-if Principia-Version>
<p>
<em>You are currently working in version <dtml-var Principia-Version></em>
</p>
</dtml-if Principia-Version>
<TABLE CELLPADDING="4" BORDER=1>
<TR>
<TD COLSPAN="2" BGCOLOR="#000099"><font color="#FFFFFF">Defined Properties</font></TD>
</TR>
<TR>
<TD WIDTH="70%" VALIGN="TOP">
<form action="<dtml-var URL1>" method="POST">
<dtml-if propertyMap>
<p>
Properties allow you to assign simple values to Zope objects.
The following properties are defined for this item.
<dtml-if property_extensible_schema__>
To <a href="#addpropform">
add a new property</a>, enter a name, type and value for the new property
and click the &quot;Add&quot; button.
</dtml-if>
To change property values, edit the
values and click "Save Changes".
</p>
<table border="0" cellspacing="0" cellpadding="2">
<table border="1" cellspacing="0" cellpadding="2">
<tr>
<th colspan="3">Property</th>
<th>Type</th>
......@@ -153,7 +148,15 @@ values and click "Save Changes".
</dtml-if>
</td>
</tr>
</table>
</table></TD>
<TD VALIGN=TOP WIDTH="30%">
Properties allow you to assign simple values to Zope objects.
The properties at left are defined for this item.
To change property values, edit the
values and click "Save Changes".
</TD>
</TR>
</TABLE>
<dtml-else>
<p>
......@@ -168,17 +171,14 @@ To add a property, click the &quot;Add...&quot; button.
</form>
<dtml-if property_extensible_schema__>
<a name="addpropform">
<TABLE CELLPADDING="4" BORDER=1>
<TR>
<TD COLSPAN="2" BGCOLOR="#000099"><font color="#FFFFFF">Add Properties</font></TD>
</TR>
<TR>
<TD WIDTH="70%" VALIGN="TOP">
<form action="<dtml-var URL1>/manage_addProperty" method="POST">
<p>
To add a new property, enter a name, type and value for the new
property and click the &quot;Add&quot;
button. For &quot;selection&quot; and &quot;multiple selection&quot;
properties enter the name of a selection variable in the &quot;Value&quot;
field. The selection variable is a property or method that returns a list
of strings from which the selection(s) can be chosen.
</p>
<table>
<table BORDER=1 CELLPADDING=2>
<tr>
<th align="left" valign="top">Name</th>
<td align="left" valign="top"><input type="text" name="id" size="20"></td>
......@@ -210,6 +210,17 @@ of strings from which the selection(s) can be chosen.
</tr>
</table>
</form>
</TD>
<TD VALIGN = "top" WIDTH="30%">
To add a new property, enter a name, type and value for the new
property and click the &quot;Add&quot;
button. For &quot;selection&quot; and &quot;multiple selection&quot;
properties enter the name of a selection variable in the &quot;Value&quot;
field. The selection variable is a property or method that returns a list
of strings from which the selection(s) can be chosen.
</TD>
</TR>
</TABLE>
</dtml-if>
</body>
......
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