|
From: Chris W. <la...@us...> - 2001-11-20 04:05:43
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_security/template
In directory usw-pr-cvs1:/tmp/cvs-serv25543/base_security/template
Modified Files:
assign_object_security.tmpl hierarchy_security.tmpl
object_class_list.tmpl
Log Message:
update security templates (concise in display and specification) and
modify slightly the handler to deal with either object or handler
class
Index: assign_object_security.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_security/template/assign_object_security.tmpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** assign_object_security.tmpl 2001/08/26 03:30:26 1.6
--- assign_object_security.tmpl 2001/11/20 04:05:40 1.7
***************
*** 1,31 ****
! [%- DEFAULT label = 'Edit Object Security';
! DEFAULT scope_size = 8;
! theme = OI.theme_properties;
! sep = ';' -%]
<h2>Object Security</h2>
<p>Edit the security for the object named below. Note that you cannot
! currently mix and match security levels per editing OI.session -- for
example, if you want to assign WRITE access to Group A and 'READ'
access to Group B, you need to first assign the rights to Group A,
click <tt>Go!</tt>, then come back to this screen and assign the
! rights to Group B.
<div align="center">
! <form name="security_editor"
! action="/Security/edit/"
! method="post">
!
! <table border="0" cellpadding="1" cellspacing="0"
! bgcolor="[% theme.border_color %]">
! <tr><td>
! <table border="0" width="100%" cellpadding="4" cellspacing="0"
! bgcolor="[% theme.bgcolor %]">
<tr bgcolor="[% theme.head_bgcolor %]">
<td colspan="2"><font size="+1" color="[% theme.head_font_color %]">
! <b>[% label %]</b>
</font></td>
</tr>
--- 1,26 ----
! [%- DEFAULT scope_size = 8;
! DEFAULT theme = OI.theme_properties;
! DEFAULT sep = ';' -%]
!
! [%- PROCESS error_message -%]
! [%- PROCESS status_message -%]
<h2>Object Security</h2>
<p>Edit the security for the object named below. Note that you cannot
! currently mix and match security levels per editing session -- for
example, if you want to assign WRITE access to Group A and 'READ'
access to Group B, you need to first assign the rights to Group A,
click <tt>Go!</tt>, then come back to this screen and assign the
! rights to Group B.</p>
<div align="center">
! <form name="security_editor" action="/Security/edit/" method="POST">
! [% INCLUDE table_bordered_begin -%]
<tr bgcolor="[% theme.head_bgcolor %]">
<td colspan="2"><font size="+1" color="[% theme.head_font_color %]">
! <b>Edit Object Security</b>
</font></td>
</tr>
***************
*** 50,55 ****
<td><font size="-1">
<select name="scope" size="[% scope_size %]" multiple>
! [%- SS = OI.security_scope -%]
! [%- SL = OI.security_level -%]
[%- FOREACH item = scope_list -%]
[%- scope_name = '??' -%]
--- 45,50 ----
<td><font size="-1">
<select name="scope" size="[% scope_size %]" multiple>
! [%- SS = OI.security_scope;
! SL = OI.security_level -%]
[%- FOREACH item = scope_list -%]
[%- scope_name = '??' -%]
***************
*** 85,95 ****
</font></td>
</tr>
- </table>
! </td></tr>
! </table>
! <input type="hidden" name="object_class" value="[% object_class %]">
! <input type="hidden" name="object_id" value="[% object_id %]">
</form>
--- 80,88 ----
</font></td>
</tr>
! [% PROCESS table_bordered_end -%]
! [% PROCESS form_hidden( name = 'object_class', value = object_class ) -%]
! [% PROCESS form_hidden( name = 'object_id', value = object_id ) -%]
</form>
Index: hierarchy_security.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_security/template/hierarchy_security.tmpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** hierarchy_security.tmpl 2001/08/25 23:25:11 1.4
--- hierarchy_security.tmpl 2001/11/20 04:05:40 1.5
***************
*** 1,5 ****
- [%- theme = OI.theme_properties -%]
[% IF object_class AND object_id -%]
<h2>Security Hierarchy</h2>
--- 1,6 ----
[% IF object_class AND object_id -%]
+ [%- DEFAULT theme = OI.theme_properties -%]
+
<h2>Security Hierarchy</h2>
***************
*** 9,59 ****
<div align="center">
! <table border="0" bgcolor="[% theme.border_color %]"
! cellspacing="0" cellpadding="2">
! <tr><td>
!
! <table border="0" bgcolor="[% theme.bgcolor %]"
! cellspacing="0" cellpadding="4">
! <tr valign="bottom" align="center">
! <td><b>Object ID</b></td>
! <td><b>Security defined?</b></td>
! <td><b>Action</b></td>
! </tr>
! [% FOREACH item = check_list -%]
! [% SET row_color = theme.odd_color -%]
! [% SET row_color = theme.even_color IF loop.count mod 2 == 0 -%]
! <tr align="center" valign="middle" bgcolor="[% row_color %]">
! <td align="left">[% item.object_id %]</td>
! [% is_defined = ( item.security_defined ) ? 'Defined' : 'Not defined' -%]
! <td>[% is_defined %]</td>
! <td>
! [% edit_url = OI.make_url( base = '/Security/show/',
object_class = object_class,
object_id = item.object_id,
! drilldown = 1 ) -%]
! <a href="[% edit_url %]">Edit</a>
! [% IF item.security_defined AND item.object_id != ROOT_OBJECT_NAME -%]
! [% clear_url = OI.make_url( base = '/Security/edit/',
! object_class = object_class,
! object_id = item.object_id,
! level = 'clear',
! scope = 'all' ) -%]
! | <a href="[% clear_url %]">Clear</a>
! [% END -%]
</td>
! </tr>
! [% END %]
!
! </table>
! </td></tr>
! </table>
</div>
-
- [% ELSE %]
<h2>Failure to Create Object!</h2>
--- 10,45 ----
<div align="center">
! [% INCLUDE table_bordered_begin -%]
! [% INCLUDE header_row( labels = [ 'Object ID', 'Security defined?', 'Action' ] ) -%]
! [% FOREACH item = check_list -%]
! [%- is_defined = ( item.security_defined ) ? 'Defined' : 'Not defined';
! edit_url = OI.make_url( base = '/Security/show/',
object_class = object_class,
object_id = item.object_id,
! drilldown = 1 );
! clear_url = OI.make_url( base = '/Security/edit/',
! object_class = object_class,
! object_id = item.object_id,
! level = 'clear',
! scope = 'all' ) -%]
! <tr align="center" valign="middle"
! bgcolor="[% PROCESS row_color( count = loop.count ) %]">
! <td align="left">[% item.object_id %]</td>
! <td>[% is_defined %]</td>
! <td><a href="[% edit_url %]">Edit</a>
! [% IF item.security_defined AND item.object_id != ROOT_OBJECT_NAME -%]
! | <a href="[% clear_url %]">Clear</a>
! [% END -%]
</td>
! </tr>
! [% END -%]
! [% PROCESS table_bordered_end -%]
</div>
+ [% ELSE -%]
<h2>Failure to Create Object!</h2>
***************
*** 63,65 ****
message. Please contact the administrator.
! [% END %]
\ No newline at end of file
--- 49,51 ----
message. Please contact the administrator.
! [% END -%]
\ No newline at end of file
Index: object_class_list.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_security/template/object_class_list.tmpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** object_class_list.tmpl 2001/08/25 20:53:27 1.1
--- object_class_list.tmpl 2001/11/20 04:05:40 1.2
***************
*** 1,55 ****
- [%#
- object_class_list.tmpl
-
- List the SPOPS object classes and handlers for which you can edit
- security.
-
- Parameters:
-
- action_list
- object_list
- Both of these parameters are lists of hashrefs. Each hashref
- should have the keys: name, class, security and
- hierarchy_security.
- -%]
-
- [% theme = OI.theme_properties -%]
-
[%########################################
! MACRO
! ######################################## %]
!
! [% MACRO class_row( item, count ) BLOCK -%]
! [% SET row_color = theme.odd_color -%]
! [% SET row_color = theme.even_color IF count mod 2 == 0 -%]
! <tr bgcolor="[% row_color %]" align="center" valign="middle">
! <td><input type="radio" name="object_class" value="[% item.class %]"></td>
! <td align="left"><font size="-1">[% item.name %]</font></td>
! <td align="left"><font size="-1">[% item.class %]</font></td>
! <td><font size="-1">[% IF item.secure %]Secure[% ELSE %] [% END %]</font></td>
! <td><font size="-1">[% IF item.hierarchy_secure %]yes[% ELSE %] [% END %]</font></td>
! </tr>
! [% END -%]
!
! [% MACRO header_label( label ) BLOCK -%]
! <font color="[% theme.head_font_color %]" size="+1"><b>[% label %]</b></font>
! [% END -%]
! [% MACRO header_row BLOCK -%]
! <tr bgcolor="[% theme.head_bgcolor %]" align="center" valign="bottom">
! <td> </td>
! <td>[% header_label( 'Name' ) %]</td>
! <td>[% header_label( 'Class' ) %]</td>
! <td>[% header_label( 'Base Security' ) %]</td>
! <td>[% header_label( 'Hierarchy Security' ) %]</td>
! </tr>
! [% END -%]
! [%########################################
! DISPLAY
! ######################################## -%]
! [%- OI.comp( 'showerror', error_msg = error_msg ) -%]
<div align="center">
--- 1,18 ----
[%########################################
! object_class_list( action_list, object_list )
! List the SPOPS object classes and handlers for which you can edit
! security.
+ Parameters:
! action_list - Both of these parameters are lists of hashrefs. Each hashref
! object_list should have the keys: name, class, security and
! hierarchy_security.
! ########################################-%]
! [% DEFAULT theme = OI.theme_properties -%]
! [%- PROCESS error_message -%]
! [%- PROCESS status_message -%]
<div align="center">
***************
*** 57,62 ****
<form name="class_listing" action="/Security/show/" method="GET">
- <table border="0" width="60%">
- <tr><td>
<h2 align="center">Security Class Listing</h2>
--- 20,23 ----
***************
*** 64,118 ****
security. Choose one of them and, if necessary, enter an object ID for
which you want to edit the security.</p>
-
- </td></tr>
- </table>
-
-
- <table border="0" cellpadding="[% theme.border_width %]" cellspacing="0"
- bgcolor="[% theme.border_color %]" width="75%">
- <tr><td>
-
- <table border="0" width="100%" bgcolor="[% theme.bgcolor %]"
- cellpadding="3" cellspacing="0">
! [% header_row() -%]
! <tr><td colspan="5" bgcolor="#ffffe0">
! <font size="-1"><b>Object Classes</b><br>
! The following are all object classes currently in the system.
! </font>
</td></tr>
[% FOREACH object_info = object_list -%]
! [% class_row( object_info, loop.count ) -%]
[% END -%]
<tr><td colspan="5" bgcolor="#ffffe0">
! <font size="-1"><b>Handler Classes</b><br>
! The following are all handlers registered in the system.
! </font>
</td></tr>
[% FOREACH action_info = action_list -%]
! [% class_row( action_info, loop.count ) -%]
[% END -%]
!
! <tr><td colspan="5" bgcolor="#ffffe0">
! <font size="-1"><b>Object ID</b><br>
! Type the Object ID for which you want to edit security. If you
! are editing handler security you can leave this blank.
! </font>
! </td></tr>
!
! <tr bgcolor="[% theme.odd_color %]"><td colspan="5" align="left">
! <input type="text" size="40" name="object_id">
</td></tr>
! <tr bgcolor="[% theme.odd_color %]"><td colspan="5" align="right">
<input type="submit" value="Edit Security">
</td></tr>
-
- </table>
! </td></tr>
! </table>
</form>
--- 25,70 ----
security. Choose one of them and, if necessary, enter an object ID for
which you want to edit the security.</p>
! [% INCLUDE table_bordered_begin -%]
! <tr><td bgcolor="#ffffe0">
! <b>Object Classes</b><br>
! The following are all object classes with security currently in the system.
</td></tr>
+ <tr><td bgcolor="[% theme.even_color %]">
+ <select name="object_class">
+ <option value="">Object Classes</option>
[% FOREACH object_info = object_list -%]
! [%- IF object_info.secure -%]
! <option value="[% object_info.class %]">
! [%- object_info.class -%] ([% object_info.name %])
! [%- ': hierarchical security' IF object_info.hierarchy_secure %]</option>
! [%- END -%]
[% END -%]
+ </select><br>
+ ID: <input type="text" size="40" name="object_id">
+ </td></tr>
<tr><td colspan="5" bgcolor="#ffffe0">
! <b>Handler Classes</b><br>
! The following are all handlers with security registered in the system.
</td></tr>
+ <tr><td bgcolor="[% theme.even_color %]">
+ <select name="handler_class">
+ <option value="">Handler Classes</option>
[% FOREACH action_info = action_list -%]
! [%- IF action_info.secure -%]
! <option value="[% action_info.class %]">
! [%- action_info.class -%] ([% action_info.name %])</option>
! [%- END -%]
[% END -%]
! </select>
</td></tr>
! <tr bgcolor="[% theme.odd_color %]"><td align="right">
<input type="submit" value="Edit Security">
</td></tr>
! [% PROCESS table_bordered_end -%]
</form>
|