You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(381) |
Nov
(176) |
Dec
(310) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(334) |
Feb
(96) |
Mar
(149) |
Apr
(214) |
May
(120) |
Jun
(56) |
Jul
(10) |
Aug
(273) |
Sep
(182) |
Oct
(56) |
Nov
(125) |
Dec
(22) |
| 2003 |
Jan
(63) |
Feb
(181) |
Mar
(498) |
Apr
(433) |
May
(39) |
Jun
(512) |
Jul
(276) |
Aug
(156) |
Sep
(101) |
Oct
(66) |
Nov
(24) |
Dec
(161) |
| 2004 |
Jan
(1) |
Feb
(377) |
Mar
(68) |
Apr
(26) |
May
(107) |
Jun
(333) |
Jul
(13) |
Aug
|
Sep
(76) |
Oct
(88) |
Nov
(170) |
Dec
(91) |
| 2005 |
Jan
(52) |
Feb
(239) |
Mar
(402) |
Apr
(15) |
May
(2) |
Jun
(1) |
Jul
(13) |
Aug
|
Sep
(71) |
Oct
(34) |
Nov
|
Dec
|
| 2006 |
Jan
(5) |
Feb
(5) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Chris W. <la...@us...> - 2001-11-20 04:09:56
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv26657/OpenInteract
Modified Files:
Auth.pm
Log Message:
add 'remember_login()' for dealing with the 'remember me' checkbox
Index: Auth.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/Auth.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Auth.pm 2001/11/13 04:03:24 1.13
--- Auth.pm 2001/11/20 04:09:53 1.14
***************
*** 52,55 ****
--- 52,56 ----
$R->{auth}{logged_in} = 1;
+ $class->remember_login;
my $CONFIG = $R->CONFIG;
***************
*** 171,183 ****
$R->DEBUG && $R->scrib( 1, "Passwords matched; UID ($user->{user_id})" );
! # If the user was matched up to a login_name and the password
! # matched, put the user_id into the session and put the user into
! # $R. Also, make the expiration transient (expires when browser
! # closes) unless the user clicked the 'Remember Me' checkbox
- my $remember_field = $CONFIG->{login}{remember_field};
- unless ( $R->apache->param( $remember_field ) ) {
- $R->{session}{expiration} = undef;
- }
$R->{session}{user_id} = $user->id;
return $user;
--- 172,178 ----
$R->DEBUG && $R->scrib( 1, "Passwords matched; UID ($user->{user_id})" );
! # Persist the user ID via the session (whether the session is
! # transient is handled in 'remember_login()')
$R->{session}{user_id} = $user->id;
return $user;
***************
*** 185,188 ****
--- 180,197 ----
+ # If we created a user, make the expiration transient unless told otherwise.
+
+ sub remember_login {
+ my ( $class ) = @_;
+ my $R = OpenInteract::Request->instance;
+ return unless ( $R->{auth}{user} );
+ return if ( $R->CONFIG->{login}{always_remember} );
+
+ my $remember_field = $R->CONFIG->{login}{remember_field};
+ if ( ! $remember_field or ! $R->apache->param( $remember_field ) ) {
+ $R->{session}{expiration} = undef;
+ }
+ }
+
# Create a 'dummy' user
***************
*** 441,451 ****
Default: Look at the 'login_field' and 'password_field' as set in the
! server configuration under 'login' for the username and password. If
! found and the user is authenticated, check if 'remember_field' is true
! and if so, make the session last for the value found in the server
! configuration under 'session_info'->'expiration'. Otherwise the
! session is transient and only lasts as long as the browser is open.
Returns: A user object. If you cannot create one, just return undef.
B<custom_login_failed()>
--- 450,469 ----
Default: Look at the 'login_field' and 'password_field' as set in the
! server configuration under 'login' for the username and password.
Returns: A user object. If you cannot create one, just return undef.
+
+ B<remember_login()>
+
+ Default is to make sessions (along with user identification) transient
+ -- once the browser that created the session is closed, the cookie
+ expires. The user can choose to have the system and their browser
+ remember the session for a longer period of time (specified in the
+ server config key 'session'->'expiration').
+
+ This method makes the session non-transient if either the user checks
+ off the 'remember_field' checkbox (the fieldname is specified in the
+ server config key 'login'->'remember_field') or if the server config
+ setting for 'login'->'always_remember' is true.
B<custom_login_failed()>
|
|
From: Chris W. <la...@us...> - 2001-11-20 04:08:33
|
Update of /cvsroot/openinteract/OpenInteract/conf
In directory usw-pr-cvs1:/tmp/cvs-serv26347/conf
Modified Files:
sample-server.ini sample-server.perl
Log Message:
added the 'login'->'always_remember' key
Index: sample-server.ini
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/conf/sample-server.ini,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sample-server.ini 2001/10/25 12:28:17 1.4
--- sample-server.ini 2001/11/20 04:08:30 1.5
***************
*** 173,180 ****
# *_field: These are the fields used to read in the username and
# password from the user and are used in the 'login_box' component
! # shipped with OpenInteract and found in the 'base_box' package.
#
# custom_login_*: Class and method that specify an action that
# executes when a user logs in (Optional)
[login]
--- 173,185 ----
# *_field: These are the fields used to read in the username and
# password from the user and are used in the 'login_box' component
! # shipped with OpenInteract and found in the 'base_box' package. Note
! # that if 'remember_field' is not defined then we don't display the
! # checkbox in the login box.
#
# custom_login_*: Class and method that specify an action that
# executes when a user logs in (Optional)
+ #
+ # always_remember: if true then we always remember the login (and
+ # don't display the checkbox)
[login]
***************
*** 185,189 ****
custom_login_handler =
custom_login_method =
!
#
--- 190,194 ----
custom_login_handler =
custom_login_method =
! always_remember = 0
#
Index: sample-server.perl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/conf/sample-server.perl,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** sample-server.perl 2001/10/17 04:54:30 1.27
--- sample-server.perl 2001/11/20 04:08:30 1.28
***************
*** 194,223 ****
# Login Information
#
# Define login information. In the future you'll be able to define
# the object(s) used for logging in and possibly more.
'login' => {
!
! # Set whether you want to store encrypted passwords in the
! # database (set by default and recommended). Note that if
! # you're using LDAP or some SMB authentication you want to set
! # this to '0' since the backend will take care of that for you.
!
! crypt_password => 1,
!
! # These are the fields used to read in the username and
! # password from the user and are used in the 'login_box'
! # component shipped with OpenInteract and found in the
! # 'base_box' package.
!
! login_field => 'login_login_name',
! password_field => 'login_password',
! remember_field => 'login_remember',
!
! # This handler defines custom actions that happen when a user
! # logs in.
!
custom_login_handler => '',
custom_login_method => '',
},
--- 194,226 ----
# Login Information
#
+ #
# Define login information. In the future you'll be able to define
# the object(s) used for logging in and possibly more.
+ #
+ # crypt_password: Set whether you want to store encrypted passwords in
+ # the database (set by default and recommended). Note that if you're
+ # using LDAP or some SMB authentication you want to set this to '0'
+ # since the backend will take care of that for you.
+ #
+ # *_field: These are the fields used to read in the username and
+ # password from the user and are used in the 'login_box' component
+ # shipped with OpenInteract and found in the 'base_box' package. Note
+ # that if 'remember_field' is not defined then we don't display the
+ # checkbox in the login box.
+ #
+ # custom_login_*: Class and method that specify an action that
+ # executes when a user logs in (Optional)
+ #
+ # always_remember: if true then we always remember the login (and
+ # don't display the checkbox)
'login' => {
! crypt_password => 1,
! login_field => 'login_login_name',
! password_field => 'login_password',
! remember_field => 'login_remember',
custom_login_handler => '',
custom_login_method => '',
+ always_remember => undef,
},
|
|
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>
|
|
From: Chris W. <la...@us...> - 2001-11-20 04:05:43
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_security/OpenInteract/Handler
In directory usw-pr-cvs1:/tmp/cvs-serv25543/base_security/OpenInteract/Handler
Modified Files:
Security.pm
Log Message:
update security templates (concise in display and specification) and
modify slightly the handler to deal with either object or handler
class
Index: Security.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_security/OpenInteract/Handler/Security.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Security.pm 2001/09/28 18:59:52 1.11
--- Security.pm 2001/11/20 04:05:40 1.12
***************
*** 18,22 ****
use constant MAIN_SCRIPT => '/Security';
- use constant OI_PACKAGE => 'base_security';
my $SECURE_CLASS = 'SPOPS::Secure';
--- 18,21 ----
***************
*** 58,65 ****
$classes_visited{ $action_class }++;
}
return $R->template->handler( {}, { object_list => \@object_class,
action_list => \@action_class },
! { db => 'object_class_list',
! package => OI_PACKAGE } );
}
--- 57,64 ----
$classes_visited{ $action_class }++;
}
+ $R->{page}{title} = 'Security Listing';
return $R->template->handler( {}, { object_list => \@object_class,
action_list => \@action_class },
! { name => 'base_security::object_class_list' });
}
***************
*** 131,136 ****
$R->{page}->{title} = 'Edit Object Security';
return $R->template->handler( {}, $params,
! { db => 'assign_object_security',
! package => 'base_security' } );
}
--- 130,134 ----
$R->{page}->{title} = 'Edit Object Security';
return $R->template->handler( {}, $params,
! { name => 'base_security::assign_object_security' } );
}
***************
*** 173,178 ****
$R->{page}->{title} = 'Object Hierarchy Security';
return $R->template->handler( {}, $params,
! { db => 'hierarchy_security',
! package => 'base_security' } );
}
--- 171,175 ----
$R->{page}->{title} = 'Object Hierarchy Security';
return $R->template->handler( {}, $params,
! { name => 'base_security::hierarchy_security' } );
}
***************
*** 208,211 ****
--- 205,209 ----
my ( $total, $success ) = ( 0, 0 );
+ my ( @status_ok );
my $security_object_class = $R->security_object;
foreach my $info ( @scope ) {
***************
*** 219,225 ****
scope_id => $info->[1],
security_level => $level };
! my $method = ( $level eq 'clear' )
? 'remove_item_security' : 'set_item_security';
! $success += eval { $SECURE_CLASS->$method( $security_params ) };
if ( $@ ) {
my $ei = OpenInteract::Error->set( SPOPS::Error->get );
--- 217,223 ----
scope_id => $info->[1],
security_level => $level };
! my $method = ( $level eq 'clear' )
? 'remove_item_security' : 'set_item_security';
! eval { $SECURE_CLASS->$method( $security_params ) };
if ( $@ ) {
my $ei = OpenInteract::Error->set( SPOPS::Error->get );
***************
*** 227,245 ****
$R->throw({ code => 406 });
}
}
my ( $error_msg );
! if ( $total != $success ) {
$error_msg = "Attempted to set ($total); set ($success). Some " .
"attempts had errors.";
}
my $return_url = $apr->param( 'return_url' );
if ( $return_url ) {
my ( $action_class, $action_method ) = $R->lookup_action( 'redirect' );
! return $action_class->$action_method({ url => $return_url,
! error_msg => $error_msg });
}
return $class->show({ object_class => $object_class,
object_id => $object_id,
error_msg => $error_msg });
}
--- 225,250 ----
$R->throw({ code => 406 });
}
+ else {
+ push @status_ok, $object_id;
+ }
}
my ( $error_msg );
! if ( $total != scalar @status_ok ) {
$error_msg = "Attempted to set ($total); set ($success). Some " .
"attempts had errors.";
}
+ my $status_msg = "Security for $object_class set for the following IDs: " .
+ join( ', ', @status_ok );
my $return_url = $apr->param( 'return_url' );
if ( $return_url ) {
my ( $action_class, $action_method ) = $R->lookup_action( 'redirect' );
! return $action_class->$action_method({ url => $return_url,
! error_msg => $error_msg,
! status_msg => $status_msg });
}
return $class->show({ object_class => $object_class,
object_id => $object_id,
+ status_msg => $status_msg,
error_msg => $error_msg });
}
***************
*** 323,327 ****
my $apr = OpenInteract::Request->instance->apache;
$object_class = $p->{object_class} ||
! $apr->param( 'object_class' );
$object_id = $p->{object_id} ||
$apr->param( 'oid' ) ||
--- 328,334 ----
my $apr = OpenInteract::Request->instance->apache;
$object_class = $p->{object_class} ||
! $apr->param( 'object_class' ) ||
! $p->{handler_class} ||
! $apr->param( 'handler_class' );
$object_id = $p->{object_id} ||
$apr->param( 'oid' ) ||
|
|
From: Chris W. <la...@us...> - 2001-11-20 04:05:42
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_security In directory usw-pr-cvs1:/tmp/cvs-serv25543/base_security Modified Files: Changes package.conf Log Message: update security templates (concise in display and specification) and modify slightly the handler to deal with either object or handler class Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_security/Changes,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Changes 2001/10/11 13:55:05 1.29 --- Changes 2001/11/20 04:05:40 1.30 *************** *** 1,4 **** --- 1,14 ---- Revision history for OpenInteract package base_security. + 1.53 Sun Nov 18 22:42:33 EST 2001 + + Modified other templates to use template widgets (where + appropriate) and other small changes. + + 1.52 Sun Nov 18 22:17:24 EST 2001 + + Modified the class listing template to be more compact and + understandable. + 1.51 Thu Oct 11 10:08:02 EDT 2001 Index: package.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_security/package.conf,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** package.conf 2001/10/11 13:55:05 1.29 --- package.conf 2001/11/20 04:05:40 1.30 *************** *** 1,4 **** name base_security ! version 1.51 author Chris Winters (ch...@cw...) url http://www.openinteract.org/ --- 1,4 ---- name base_security ! version 1.53 author Chris Winters (ch...@cw...) url http://www.openinteract.org/ |
|
From: Chris W. <la...@us...> - 2001-11-20 04:03:50
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_box/OpenInteract/Handler
In directory usw-pr-cvs1:/tmp/cvs-serv24936/OpenInteract/Handler
Modified Files:
Box.pm
Log Message:
modify the login box and ensure we have adequate debugging for custom
handler and for box removal
Index: Box.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_box/OpenInteract/Handler/Box.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Box.pm 2001/11/01 05:40:51 1.14
--- Box.pm 2001/11/20 04:03:48 1.15
***************
*** 48,51 ****
--- 48,53 ----
eval "require $custom_box_class";
my $custom_box_method = $BOX_CONFIG->{custom_box_method} || DEFAULT_METHOD;
+ $R->DEBUG && $R->scrib( "Calling custom box handler:",
+ "$custom_box_class\->$custom_box_method" );
eval { $custom_box_class->$custom_box_method() };
if ( $@ ) {
***************
*** 78,82 ****
if ( $box_info->{remove} ) {
push @to_remove, $box_info->{name};
! next;
}
--- 80,84 ----
if ( $box_info->{remove} ) {
push @to_remove, $box_info->{name};
! next BOX;
}
***************
*** 125,128 ****
--- 127,131 ----
$box_info->{weight} ||= DEFAULT_BOX_WEIGHT;
next BOX if ( $box_info->{weight} > MAX_BOX_WEIGHT );
+
$R->DEBUG && $R->scrib( 1, "Putting box ($box_info->{name}) onto the",
"stack with weight $box_info->{weight}" );
***************
*** 133,136 ****
--- 136,140 ----
foreach my $remove_name ( @to_remove ) {
+ $R->DEBUG && $R->scrib( 1, "Trying to remove box: $remove_name" );
delete $good_boxes{ $remove_name } if ( $remove_name );
}
***************
*** 160,164 ****
# Generate content for each box
! my @boxes = ();
$R->DEBUG && $R->scrib( 2, "Sorted boxes currently in the list:\n", Dumper( \@sorted_boxes ) );
foreach my $box_info ( @sorted_boxes ) {
--- 164,168 ----
# Generate content for each box
! my @content = ();
$R->DEBUG && $R->scrib( 2, "Sorted boxes currently in the list:\n", Dumper( \@sorted_boxes ) );
foreach my $box_info ( @sorted_boxes ) {
***************
*** 194,198 ****
{ name => $box_template_fullname } );
}
! push @boxes, $box_content;
}
--- 198,202 ----
{ name => $box_template_fullname } );
}
! push @content, $box_content;
}
***************
*** 200,204 ****
|| $BOX_CONFIG->{default_separator}
|| DEFAULT_SEPARATOR;
! return join( $sep_string, @boxes );
}
--- 204,208 ----
|| $BOX_CONFIG->{default_separator}
|| DEFAULT_SEPARATOR;
! return join( $sep_string, @content );
}
|
|
From: Chris W. <la...@us...> - 2001-11-20 04:03:50
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_box/template
In directory usw-pr-cvs1:/tmp/cvs-serv24936/template
Modified Files:
login_box.tmpl
Log Message:
modify the login box and ensure we have adequate debugging for custom
handler and for box removal
Index: login_box.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_box/template/login_box.tmpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** login_box.tmpl 2001/08/13 16:10:14 1.4
--- login_box.tmpl 2001/11/20 04:03:48 1.5
***************
*** 1,5 ****
! [%- th = OI.theme_properties -%]
! [%- DEFAULT label = 'Login' -%]
! <form name="OI.login" action="/" method="post">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr align="center">
--- 1,14 ----
! [%- DEFAULT theme = OI.theme_properties;
! DEFAULT return_url = OI.return_url || '/';
! login_config = OI.server_config.login;
! submit_colspan = 1 -%]
!
! <form name="login" action="[% return_url %]" method="post">
!
! [%- IF login_config.always_remember -%]
! [%- submit_colspan = 2 -%]
! [%- PROCESS form_hidden( name = login_config.remember_field, value = 'yes' ) -%]
! [%- END -%]
!
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr align="center">
***************
*** 11,40 ****
<tr align="center">
<td colspan="2"><font color="#ff0000" size="-1">
! [% OI.error_hold.loginbox.bad_login %]
</font></td>
</tr>
[%- END -%]
<tr>
! <td align="right"><font color="[% th.box_font_color %]" size="-1">
Name
</font></td>
<td><font size="-1">
! <input type="text" size="8" name="login_login_name"
value="[% OI.error_hold.loginbox.login_name %]">
</font></td>
</tr>
<tr>
! <td align="right"><font color="[% th.box_font_color %]" size="-1">
Password
</font></td>
<td><font size="-1">
! <input type="password" size="8" name="login_password">
</font></td>
</tr>
<tr>
<td align="left"><font size="-1">
! <input type="checkbox" value="yes" name="login_remember"> Remember me
</td>
! <td align="right"><font size="-1">
<input type="submit" value="Login">
</font></td>
--- 20,56 ----
<tr align="center">
<td colspan="2"><font color="#ff0000" size="-1">
! <b>[% OI.error_hold.loginbox.bad_login %]</b>
</font></td>
</tr>
[%- END -%]
<tr>
! <td align="right"><font color="[% theme.box_font_color %]" size="-1">
Name
</font></td>
<td><font size="-1">
! <input type="text" size="8" name="[% login_config.login_field %]"
value="[% OI.error_hold.loginbox.login_name %]">
</font></td>
</tr>
<tr>
! <td align="right"><font color="[% theme.box_font_color %]" size="-1">
Password
</font></td>
<td><font size="-1">
! <input type="password" size="8" name="[% login_config.password_field %]">
</font></td>
</tr>
<tr>
+ [% IF NOT login_config.always_remember -%]
+ [%- IF login_config.remember_field -%]
<td align="left"><font size="-1">
! <input type="checkbox" value="yes"
! name="[% login_config.remember_field %]"> Remember me
</td>
! [%- ELSE -%]
! [%- submit_colspan = 2 -%]
! [%- END -%]
! [% END -%]
! <td align="right" colspan="[% submit_colspan %]"><font size="-1">
<input type="submit" value="Login">
</font></td>
|
|
From: Chris W. <la...@us...> - 2001-11-20 04:03:50
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_box In directory usw-pr-cvs1:/tmp/cvs-serv24936 Modified Files: Changes package.conf Log Message: modify the login box and ensure we have adequate debugging for custom handler and for box removal Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_box/Changes,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Changes 2001/11/01 05:40:51 1.26 --- Changes 2001/11/20 04:03:48 1.27 *************** *** 1,4 **** --- 1,19 ---- Revision history for OpenInteract package base_box. + 0.41 Mon Nov 19 08:35:34 EST 2001 + + Small modifications to ensure items are being removed. + + 0.40 Mon Nov 19 00:03:43 EST 2001 + + Update all box entries in conf/action.perl to have a name and a + fully-qualified template name. + + 0.39 Sun Nov 18 23:41:51 EST 2001 + + Update login_box to honor the login->always_remember server + config key and to not display the 'remember' checkbox if there's + no field specified in the server config. + 0.38 Thu Nov 1 00:57:09 EST 2001 Index: package.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_box/package.conf,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** package.conf 2001/11/01 05:40:51 1.25 --- package.conf 2001/11/20 04:03:48 1.26 *************** *** 1,4 **** name base_box ! version 0.38 author Chris Winters <ch...@cw...> url http://www.openinteract.org/ --- 1,4 ---- name base_box ! version 0.41 author Chris Winters <ch...@cw...> url http://www.openinteract.org/ |
|
From: Chris W. <la...@us...> - 2001-11-20 04:03:50
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_box/conf
In directory usw-pr-cvs1:/tmp/cvs-serv24936/conf
Modified Files:
action.perl
Log Message:
modify the login box and ensure we have adequate debugging for custom
handler and for box removal
Index: action.perl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_box/conf/action.perl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** action.perl 2001/07/20 10:25:53 1.4
--- action.perl 2001/11/20 04:03:48 1.5
***************
*** 10,13 ****
--- 10,14 ----
},
'templates_used_box' => {
+ name => 'templates_used_box',
class => 'OpenInteract::Handler::SystemBoxes',
method => 'templates_used',
***************
*** 17,22 ****
},
'object_modify_box' => {
! template => 'object_modify_box',
! package => 'base_box',
weight => 4,
title => 'Object Info',
--- 18,23 ----
},
'object_modify_box' => {
! name => 'object_modify_box',
! template => 'base_box::object_modify_box',
weight => 4,
title => 'Object Info',
***************
*** 24,29 ****
},
'login_box' => {
! template => 'login_box',
! package => 'base_box',
weight => 1,
title => 'Login',
--- 25,30 ----
},
'login_box' => {
! name => 'login_box',
! template => 'base_box::login_box',
weight => 1,
title => 'Login',
***************
*** 31,36 ****
},
'user_info_box' => {
! template => 'user_info_box',
! package => 'base_box',
weight => 1,
title => 'Your Info',
--- 32,37 ----
},
'user_info_box' => {
! name => 'user_info_box',
! template => 'base_box::user_info_box',
weight => 1,
title => 'Your Info',
***************
*** 38,43 ****
},
'admin_tools_box' => {
! template => 'admin_tools_box',
! package => 'base_box',
weight => 10,
title => 'Admin Tools',
--- 39,44 ----
},
'admin_tools_box' => {
! name => 'admin_tools_box',
! template => 'base_box::admin_tools_box',
weight => 10,
title => 'Admin Tools',
***************
*** 45,52 ****
},
'powered_by_box' => {
! 'weight' => 8,
! 'title' => 'Powered By',
! 'template' => 'powered_by_box',
! 'package' => 'base_box'
},
'object_mod_box' => { 'redir' => 'object_modify_box' },
--- 46,54 ----
},
'powered_by_box' => {
! name => 'powered_by_box',
! template => 'base_box::powered_by_box',
! weight => 8,
! title => 'Powered By',
! security => 'no',
},
'object_mod_box' => { 'redir' => 'object_modify_box' },
|
|
From: Chris W. <la...@us...> - 2001-11-20 03:30:58
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_user/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv17800/OpenInteract
Modified Files:
User.pm
Log Message:
added 'is_in_group()' method to user object (thanks Jochen)
Index: User.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/OpenInteract/User.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** User.pm 2001/09/14 20:50:25 1.5
--- User.pm 2001/11/20 03:30:54 1.6
***************
*** 87,90 ****
--- 87,101 ----
}
+
+ sub is_in_group {
+ my ( $self, $group_spec ) = @_;
+ my $check_group_id = ( ref $group_spec )
+ ? $group_spec->id : $group_spec;
+ foreach my $group ( @{ $R->{auth}{group} } ) {
+ return 1 if ( $group->id == $check_group_id );
+ }
+ return undef;
+ }
+
1;
***************
*** 105,111 ****
$user->increment_login();
print "Username: $user->{username}\n";
!
=head1 DESCRIPTION
=head1 METHODS
--- 116,130 ----
$user->increment_login();
print "Username: $user->{username}\n";
!
! # See if the user is in a particular group
! if ( $user->is_in_group( $group ) ) {
! print "Enter!";
! }
!
!
=head1 DESCRIPTION
+ Basic methods for user objects
+
=head1 METHODS
***************
*** 124,127 ****
--- 143,153 ----
Return a 1 if the password matches what is in the database, a 0 if
not.
+
+ B<is_in_group( $group | $group_id )>
+
+ Ask a user object if it belongs to a particular group. You can pass
+ either a group object or its ID.
+
+ Returns true if the user is in the group, false, if not.
=head1 TO DO
|
|
From: Chris W. <la...@us...> - 2001-11-20 03:30:58
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_user In directory usw-pr-cvs1:/tmp/cvs-serv17800 Modified Files: Changes package.conf Log Message: added 'is_in_group()' method to user object (thanks Jochen) Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/Changes,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Changes 2001/10/31 13:58:37 1.27 --- Changes 2001/11/20 03:30:54 1.28 *************** *** 1,4 **** --- 1,9 ---- Revision history for OpenInteract package base_user. + 1.43 Mon Nov 19 22:49:14 EST 2001 + + Added 'is_in_group()' thanks to the prompting of Jochen Lillich + <jl...@te...> + 1.42 Wed Oct 31 09:09:08 EST 2001 Index: package.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/package.conf,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** package.conf 2001/10/31 13:58:37 1.27 --- package.conf 2001/11/20 03:30:54 1.28 *************** *** 1,4 **** name base_user ! version 1.42 author Chris Winters (ch...@cw...) url http://www.openinteract.org/ --- 1,4 ---- name base_user ! version 1.43 author Chris Winters (ch...@cw...) url http://www.openinteract.org/ |
|
From: Chris W. <la...@us...> - 2001-11-19 04:14:36
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract/Template
In directory usw-pr-cvs1:/tmp/cvs-serv6073
Modified Files:
Plugin.pm
Log Message:
added new property 'server_config' available from anywhere
Index: Plugin.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/Template/Plugin.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Plugin.pm 2001/10/24 16:05:43 1.16
--- Plugin.pm 2001/11/19 04:14:32 1.17
***************
*** 380,384 ****
--- 380,388 ----
}
+ sub server_config {
+ return OpenInteract::Request->instance->CONFIG;
+ }
+
1;
***************
*** 973,980 ****
C<security_level>.
! [% security_scope = OI.security_scope %]
! [% FOREACH scope = security_scope.keys %]
! OI defines [% scope %] as [% security_scope.$scope %]
! [% END %]
=head1 NOTICE
--- 977,994 ----
C<security_level>.
! [% security_scope = OI.security_scope %]
! [% FOREACH scope = security_scope.keys %]
! OI defines [% scope %] as [% security_scope.$scope %]
! [% END %]
!
! B<server_config()>
!
! Returns the server configuration object (or hashref) -- whatever is
! returned by calling in normal code:
!
! $R->CONFIG;
!
! The ID of the site admin group is:
! [% OI.server_config.default_objects.site_admin_group %]
=head1 NOTICE
|
|
From: Chris W. <la...@us...> - 2001-11-15 05:19:34
|
Update of /cvsroot/openinteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv8556
Modified Files:
Changes
Log Message:
latest changes (OI::ApacheStartup)
Index: Changes
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/Changes,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -d -r1.80 -r1.81
*** Changes 2001/11/08 17:57:12 1.80
--- Changes 2001/11/15 05:19:31 1.81
***************
*** 109,112 ****
--- 109,118 ----
necessary changes to your Apache config.
+ - Also modified the startup procedure to read and the child init
+ handler to write information to a package variable in lieu of using
+ PerlSetVar in the configuration file. (Encountered some nastiness
+ on Solaris under 5.005_03/1.3.22/1.26 and the PerlSetVar items not
+ being there.)
+
* OpenInteract/Auth.pm:
|
|
From: Chris W. <la...@us...> - 2001-11-15 05:19:11
|
Update of /cvsroot/openinteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv8498
Modified Files:
OpenInteract.pm
Log Message:
don't call $R->CONFIG if $R isn't a ref (in case of error)
Index: OpenInteract.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** OpenInteract.pm 2001/11/08 15:14:06 1.20
--- OpenInteract.pm 2001/11/15 05:19:08 1.21
***************
*** 352,361 ****
sub send_html {
my ( $class, $apache, $content, $R ) = @_;
! $R ||= {};
my $content_type = $R->{page}{content_type} || $apache->content_type || 'text/html';
$content_type = ( $content_type eq 'httpd/unix-directory' ) ? 'text/html' : $content_type;
- unless ( $R->CONFIG->{no_promotion} ) {
- $apache->headers_out->{'X-Powered-By'} = "OpenInteract $OpenInteract::VERSION";
- }
$apache->send_http_header( $content_type );
$apache->print( $content );
--- 352,362 ----
sub send_html {
my ( $class, $apache, $content, $R ) = @_;
! if ( ref $R ) {
! unless ( $R->CONFIG->{no_promotion} ) {
! $apache->headers_out->{'X-Powered-By'} = "OpenInteract $OpenInteract::VERSION";
! }
! }
my $content_type = $R->{page}{content_type} || $apache->content_type || 'text/html';
$content_type = ( $content_type eq 'httpd/unix-directory' ) ? 'text/html' : $content_type;
$apache->send_http_header( $content_type );
$apache->print( $content );
|
|
From: Chris W. <la...@us...> - 2001-11-15 05:15:01
|
Update of /cvsroot/openinteract/OpenInteract/conf In directory usw-pr-cvs1:/tmp/cvs-serv7933 Modified Files: sample-httpd_modperl.conf sample-httpd_modperl_solo.conf Log Message: removed OIRootDir Index: sample-httpd_modperl.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/conf/sample-httpd_modperl.conf,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sample-httpd_modperl.conf 2001/11/06 15:01:26 1.5 --- sample-httpd_modperl.conf 2001/11/15 05:14:58 1.6 *************** *** 45,49 **** PerlSetVar OIStashClass %%STASH_CLASS%% - PerlSetVar OIRootDir %%WEBSITE_DIR%% # This sends all incoming requests to the OpenInteract Apache content --- 45,48 ---- Index: sample-httpd_modperl_solo.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/conf/sample-httpd_modperl_solo.conf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sample-httpd_modperl_solo.conf 2001/11/06 15:01:26 1.2 --- sample-httpd_modperl_solo.conf 2001/11/15 05:14:58 1.3 *************** *** 33,37 **** PerlSetVar OIStashClass %%STASH_CLASS%% - PerlSetVar OIRootDir %%WEBSITE_DIR%% # This sends all incoming requests (except for the 'Location' --- 33,36 ---- |
|
From: Chris W. <la...@us...> - 2001-11-15 05:12:36
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv7598
Modified Files:
ApacheStartup.pm
Log Message:
modified how we do the childinit -- we no longer rely on ANY
perlsetvar items; instead we set in startup.pl some package info in
the OpenInteract package
Index: ApacheStartup.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/ApacheStartup.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ApacheStartup.pm 2001/11/09 14:18:58 1.19
--- ApacheStartup.pm 2001/11/15 05:12:33 1.20
***************
*** 11,16 ****
use constant DEBUG => 0;
! $OpenInteract::ApacheStartup::VERSION = '1.07';
! $OpenInteract::ApacheStartup::Revision = substr(q$Revision$, 10);
# Create a handler to put the X-Forwarded-For header into the IP
--- 11,15 ----
use constant DEBUG => 0;
! $OpenInteract::ApacheStartup::VERSION = substr(q$Revision$, 10);
# Create a handler to put the X-Forwarded-For header into the IP
***************
*** 98,104 ****
}
else {
! DEBUG && _w( 1, "SERVER INIT: Adding ChildInitHandler for initialization" );
! Apache->push_handlers( PerlChildInitHandler => \&child_init );
}
}
--- 97,110 ----
}
else {
! unless ( $OpenInteract::is_initialized ) {
! DEBUG && _w( 1, "SERVER INIT: Adding ChildInitHandler for initialization" );
! Apache->push_handlers( PerlChildInitHandler => \&child_init );
! }
}
+
+ $OpenInteract::is_initialized++;
+ push @OpenInteract::to_initialize, [ $BASE_CONFIG->{website_dir},
+ $BASE_CONFIG->{stash_class} ];
+
}
***************
*** 106,120 ****
sub child_init {
my ( $r ) = @_;
!
! my $server = ( $r ) ? $r->server : Apache->server;
!
! my $stash_class = $server->dir_config( 'OIStashClass' );
! my $website_dir = $server->dir_config( 'OIRootDir' );
!
! DEBUG && _w( 1, "PerlChildInitHandler being executed for Child ($$) with stash ($stash_class)" );
!
! my $BASE_CONFIG = OpenInteract::Startup->read_base_config({ website_dir => $website_dir });
! unless ( $BASE_CONFIG ) { die "Cannot create base configuration from ($website_dir)!"; }
! DEBUG && _w( 1, "CHILD INIT: base configuration read in ok." );
# seed the random number generator per child -- note that we can
--- 112,116 ----
sub child_init {
my ( $r ) = @_;
! DEBUG && _w( 1, "CHILD INIT: Being executed for child ($$)" );
# seed the random number generator per child -- note that we can
***************
*** 124,172 ****
srand;
! # The big enchilada -- do just about everything here and get back the
! # list of classes that need to be initialized along with the config object.
! # Note that we do not pass the necessary parameters to initialize aliases
! # and to create/initialize the SPOPS classes -- we do that in the child
! # init handler below
! my ( $init_class, $C ) = OpenInteract::Startup->main_initialize({
! base_config => $BASE_CONFIG });
! unless ( $C ) { die "No configuration object returned from initialization!\n"; }
! DEBUG && _w( 1, "CHILD INIT: main initialization completed ok." );
! OpenInteract::Startup->require_module({ class => $C->{session_info}{class} });
! DEBUG && _w( 1, "CHILD INIT: require the session class ok" );
! # Figure out how to do this more cleanly in the near future -- maybe
! # just do it by hand for this special class?
- push @{ $init_class }, 'OpenInteract::PackageRepository';
! # Setup caching info for use in the child init handler below
! my $cache_info = $C->{cache_info}{data};
! my $cache_class = $cache_info->{class};
! my $ipc_cache_class = $C->{cache}{ipc}{class};
! $cache_class->class_initialize({ config => $C }) if ( $cache_info->{use} );
! $ipc_cache_class->class_initialize({ config => $C }) if ( $cache_info->{use_ipc} );
! # Tell OpenInteract::Request to setup aliases if it hasn't already
! my $REQUEST_CLASS = $BASE_CONFIG->{request_class};
! $REQUEST_CLASS->setup_aliases;
! DEBUG && _w( 1, "CHILD INIT: setup \$R aliases ok" );
! # Initialize all the SPOPS object classes
! OpenInteract::Startup->initialize_spops({ config => $C,
! class => $init_class });
! DEBUG && _w( 1, "CHILD INIT: initialize SPOPS classes ok" );
! # Create a list of error handlers for our website
! eval { OpenInteract::Error::Main->initialize({ config => $C }) };
! my $err_status = ( $@ ) ? $@ : 'ok';
! DEBUG && _w( 1, sprintf( "CHILD INIT: %-40s: %-30s","init: Error Dispatcher", $err_status ) );
}
--- 120,186 ----
srand;
! # Whenever we run a startup.pl for a vhost we push information
! # into the package variable @OpenInteract::to_initialize;
! foreach my $entry ( @OpenInteract::to_initialize ) {
! my $website_dir = $entry->[0];
! my $stash_class = $entry->[1];
! DEBUG && _w( 1, "CHILD INIT: In site root ($website_dir) with stash ($stash_class)" );
! my $BASE_CONFIG = OpenInteract::Startup->read_base_config({
! website_dir => $website_dir });
! unless ( $BASE_CONFIG ) {
! die "Cannot create base configuration from ($website_dir)!";
! }
! DEBUG && _w( 1, "CHILD INIT: base configuration read in ok." );
! # The big enchilada -- do just about everything here and get
! # back the list of classes that need to be initialized along
! # with the config object.
! my ( $init_class, $C ) = OpenInteract::Startup->main_initialize({
! base_config => $BASE_CONFIG });
! unless ( $C ) { die "No configuration object returned from initialization!\n"; }
! DEBUG && _w( 1, "CHILD INIT: main initialization completed ok." );
! OpenInteract::Startup->require_module({ class => $C->{session_info}{class} });
! DEBUG && _w( 1, "CHILD INIT: require the session class ok" );
! # Figure out how to do this more cleanly in the near future --
! # maybe just do it by hand for this special class?
! push @{ $init_class }, 'OpenInteract::PackageRepository';
! # Setup caching info for use in the child init handler below
! my $cache_info = $C->{cache_info}{data};
! my $cache_class = $cache_info->{class};
! my $ipc_cache_class = $C->{cache}{ipc}{class};
! $cache_class->class_initialize({ config => $C }) if ( $cache_info->{use} );
! $ipc_cache_class->class_initialize({ config => $C }) if ( $cache_info->{use_ipc} );
! # Tell OpenInteract::Request to setup aliases if it hasn't
! # already
!
! my $REQUEST_CLASS = $BASE_CONFIG->{request_class};
! $REQUEST_CLASS->setup_aliases;
! DEBUG && _w( 1, "CHILD INIT: setup \$R aliases ok" );
!
! # Initialize all the SPOPS object classes
!
! OpenInteract::Startup->initialize_spops({ config => $C,
! class => $init_class });
! DEBUG && _w( 1, "CHILD INIT: initialize SPOPS classes ok" );
!
! # Create a list of error handlers for our website
!
! eval { OpenInteract::Error::Main->initialize({ config => $C }) };
! my $err_status = ( $@ ) ? $@ : 'ok';
! DEBUG && _w( 1, sprintf( "CHILD INIT: %-40s: %-30s","init: Error Dispatcher", $err_status ) );
! }
! DEBUG && _w( 1, "CHILD INIT: All items initialized. Done." );
}
|
|
From: Chris W. <la...@us...> - 2001-11-14 12:56:54
|
Update of /cvsroot/openinteract/OpenInteract/script
In directory usw-pr-cvs1:/tmp/cvs-serv18091
Modified Files:
oi_manage
Log Message:
fixed trailing labels on a couple of actions
Index: oi_manage
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/script/oi_manage,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** oi_manage 2001/11/08 17:56:05 1.52
--- oi_manage 2001/11/14 12:56:50 1.53
***************
*** 466,470 ****
print "The following documents were considered:\n\n",
$doc_status,
! "\n$SEP\nFinished listing actions!\n";
exit(0);
}
--- 466,470 ----
print "The following documents were considered:\n\n",
$doc_status,
! "\n$SEP\nFinished refreshing docs!\n";
exit(0);
}
***************
*** 496,500 ****
print "The following widgets were considered:\n\n",
$widget_status,
! "\n$SEP\nFinished listing actions!\n";
exit(0);
}
--- 496,500 ----
print "The following widgets were considered:\n\n",
$widget_status,
! "\n$SEP\nFinished refreshing widgets!\n";
exit(0);
}
|
|
From: Chris W. <la...@us...> - 2001-11-13 12:07:33
|
Update of /cvsroot/openinteract/OpenInteract In directory usw-pr-cvs1:/tmp/cvs-serv794 Modified Files: MANIFEST Log Message: update to latest versions of packages Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/MANIFEST,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** MANIFEST 2001/11/08 15:11:40 1.72 --- MANIFEST 2001/11/13 12:07:30 1.73 *************** *** 90,110 **** OpenInteract/Intro.pod pkg/base-1.63.tar.gz ! pkg/base_box-0.37.tar.gz pkg/base_component-1.30.tar.gz pkg/base_error-1.34.tar.gz ! pkg/base_group-1.26.tar.gz ! pkg/base_page-0.26.tar.gz pkg/base_security-1.51.tar.gz pkg/base_template-1.27.tar.gz ! pkg/base_theme-1.28.tar.gz ! pkg/base_user-1.40.tar.gz ! pkg/lookup-0.17.tar.gz pkg/object_activity-0.10.tar.gz ! pkg/results_manage-0.05.tar.gz pkg/system_doc-1.27.tar.gz pkg/classified-1.32.tar.gz pkg/full_text-1.30.tar.gz pkg/news-1.33.tar.gz - pkg/static_page-1.52.tar.gz script/oi_manage script/template_translate.pl --- 90,109 ---- OpenInteract/Intro.pod pkg/base-1.63.tar.gz ! pkg/base_box-0.38.tar.gz pkg/base_component-1.30.tar.gz pkg/base_error-1.34.tar.gz ! pkg/base_group-1.27.tar.gz ! pkg/base_page-0.28.tar.gz pkg/base_security-1.51.tar.gz pkg/base_template-1.27.tar.gz ! pkg/base_theme-1.29.tar.gz ! pkg/base_user-1.42.tar.gz ! pkg/lookup-0.18.tar.gz pkg/object_activity-0.10.tar.gz ! pkg/results_manage-0.06.tar.gz pkg/system_doc-1.27.tar.gz pkg/classified-1.32.tar.gz pkg/full_text-1.30.tar.gz pkg/news-1.33.tar.gz script/oi_manage script/template_translate.pl |
|
From: Chris W. <la...@us...> - 2001-11-13 04:03:27
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv25618
Modified Files:
Auth.pm
Log Message:
updated so we check to see if the login exists before trying to fetch by it (duh)
Index: Auth.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/Auth.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Auth.pm 2001/11/06 14:30:28 1.12
--- Auth.pm 2001/11/13 04:03:24 1.13
***************
*** 140,144 ****
--- 140,146 ----
my $login_name = $apr->param( $login_field );
+ return undef unless ( $login_name );
$R->DEBUG && $R->scrib( 1, "Found login name from form: ($login_name)" );
+
my $user = eval { $R->user->fetch_by_login_name( $login_name,
{ return_single => 1,
|
|
From: Chris W. <la...@us...> - 2001-11-09 19:24:02
|
Update of /cvsroot/openinteract/OpenInteract/pkg/lookup/template
In directory usw-pr-cvs1:/tmp/cvs-serv15574
Modified Files:
lookup_listing_columns.tmpl lookup_listing.tmpl
Log Message:
ensure remove name is specified correctly
Index: lookup_listing_columns.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/template/lookup_listing_columns.tmpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** lookup_listing_columns.tmpl 2001/10/27 04:54:11 1.6
--- lookup_listing_columns.tmpl 2001/11/09 19:23:59 1.7
***************
*** 33,37 ****
[% END -%]
<td><font size="-1">
! [% IF o %][% PROCESS form_checkbox( name = "$remove_key$this_id", value = 'yes' ) -%]
[% ELSE %] [% END -%]
</font></td>
--- 33,37 ----
[% END -%]
<td><font size="-1">
! [% IF o %][% PROCESS form_checkbox( name = "$remove_key-$this_id", value = 'yes' ) -%]
[% ELSE %] [% END -%]
</font></td>
Index: lookup_listing.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/template/lookup_listing.tmpl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** lookup_listing.tmpl 2001/10/27 04:54:11 1.7
--- lookup_listing.tmpl 2001/11/09 19:23:59 1.8
***************
*** 50,54 ****
<tr bgcolor="[% PROCESS row_color( count = loop.count ) %]" valign="top" align="left">
<td>[% lookup_entry_table( o = item ) -%]</td>
! <td>[% PROCESS form_checkbox( name = "$remove_key$item.id", value = 'yes' ) %] Remove?</td>
</tr>
[% END -%]
--- 50,54 ----
<tr bgcolor="[% PROCESS row_color( count = loop.count ) %]" valign="top" align="left">
<td>[% lookup_entry_table( o = item ) -%]</td>
! <td>[% PROCESS form_checkbox( name = "$remove_key-$item.id", value = 'yes' ) %] Remove?</td>
</tr>
[% END -%]
|
|
From: Chris W. <la...@us...> - 2001-11-09 19:19:50
|
Update of /cvsroot/openinteract/OpenInteract/pkg/lookup/template
In directory usw-pr-cvs1:/tmp/cvs-serv13643
Modified Files:
lookup_field.tmpl
Log Message:
update so the first entry is always blank
Index: lookup_field.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/template/lookup_field.tmpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** lookup_field.tmpl 2001/11/09 14:08:38 1.3
--- lookup_field.tmpl 2001/11/09 19:19:47 1.4
***************
*** 1,4 ****
--- 1,5 ----
[%- IF related.$name -%]
[% INCLUDE form_select( name = "$name-$id",
+ first_label = 'Choose an entry',
picked = value,
list = related.$name.list,
|
|
From: Chris W. <la...@us...> - 2001-11-09 18:23:16
|
Update of /cvsroot/openinteract/OpenInteract/pkg/lookup/template
In directory usw-pr-cvs1:/tmp/cvs-serv25850
Modified Files:
lookup_partitions.tmpl
Log Message:
weird -- form_select somehow got changed to form_submit...
Index: lookup_partitions.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/template/lookup_partitions.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lookup_partitions.tmpl 2001/10/18 12:39:44 1.2
--- lookup_partitions.tmpl 2001/11/09 18:23:13 1.3
***************
*** 24,28 ****
<p>Values:
! [% PROCESS form_submit( name = 'partition_value', plain = 1,
value_list = value_list ) -%]
[% PROCESS form_submit( value = 'Go' ) -%]
--- 24,28 ----
<p>Values:
! [% PROCESS form_select( name = 'partition_value', plain = 1,
value_list = value_list ) -%]
[% PROCESS form_submit( value = 'Go' ) -%]
|
|
From: Chris W. <la...@us...> - 2001-11-09 14:19:00
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv2137
Modified Files:
ApacheStartup.pm
Log Message:
small doc/debugging updates
Index: ApacheStartup.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/ApacheStartup.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ApacheStartup.pm 2001/11/09 13:08:54 1.18
--- ApacheStartup.pm 2001/11/09 14:18:58 1.19
***************
*** 87,92 ****
! my ( $OS );
! unless ( $OS = $^O ) {
require Config;
$OS = $Config::Config{ 'osname' };
--- 87,92 ----
! my $OS = $^O;
! unless ( $OS ) {
require Config;
$OS = $Config::Config{ 'osname' };
***************
*** 95,101 ****
if ( $OS =~ /Win32/i ) {
DEBUG && _w( 1, "SERVER INIT: Running initialization for Windows." );
! child_init();
}
else {
Apache->push_handlers( PerlChildInitHandler => \&child_init );
}
--- 95,102 ----
if ( $OS =~ /Win32/i ) {
DEBUG && _w( 1, "SERVER INIT: Running initialization for Windows." );
! child_init();
}
else {
+ DEBUG && _w( 1, "SERVER INIT: Adding ChildInitHandler for initialization" );
Apache->push_handlers( PerlChildInitHandler => \&child_init );
}
|
|
From: Chris W. <la...@us...> - 2001-11-09 14:08:41
|
Update of /cvsroot/openinteract/OpenInteract/pkg/lookup/template In directory usw-pr-cvs1:/tmp/cvs-serv30471/template Modified Files: lookup_field.tmpl Log Message: update to allow users to have one or more fields be lookups to other objects Index: lookup_field.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/template/lookup_field.tmpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lookup_field.tmpl 2001/10/03 13:09:42 1.2 --- lookup_field.tmpl 2001/11/09 14:08:38 1.3 *************** *** 1,2 **** [% DEFAULT size = 40; -%] ! <input type="text" size="[% size %]" name="[% name %]-[% id %]" value="[% value %]"> --- 1,10 ---- + [%- IF related.$name -%] + [% INCLUDE form_select( name = "$name-$id", + picked = value, + list = related.$name.list, + label_field = related.$name.label_field, + value_field = 'id' ) -%] + [%- ELSE -%] [% DEFAULT size = 40; -%] ! [% INCLUDE form_text( name = "$name-$id" ) -%] ! [%- END -%] |
|
From: Chris W. <la...@us...> - 2001-11-09 14:08:41
|
Update of /cvsroot/openinteract/OpenInteract/pkg/lookup/OpenInteract/Handler
In directory usw-pr-cvs1:/tmp/cvs-serv30471/OpenInteract/Handler
Modified Files:
LookupEdit.pm
Log Message:
update to allow users to have one or more fields be lookups to other
objects
Index: LookupEdit.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/OpenInteract/Handler/LookupEdit.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LookupEdit.pm 2001/10/18 12:39:44 1.6
--- LookupEdit.pm 2001/11/09 14:08:38 1.7
***************
*** 103,108 ****
}
! my @lookup_keys = qw( field_list label_list size_list title lookup_type partition_field );
my %params = map { $_ => $lookup_info->{ $_ } } @lookup_keys;
$params{blank_count} = $BLANK_COUNT;
$params{remove_key} = $REMOVE_KEY;
--- 103,110 ----
}
! my @lookup_keys = qw( field_list label_list size_list title
! lookup_type partition_field );
my %params = map { $_ => $lookup_info->{ $_ } } @lookup_keys;
+
$params{blank_count} = $BLANK_COUNT;
$params{remove_key} = $REMOVE_KEY;
***************
*** 117,124 ****
my %lbl = map { $params{field_list}->[ $_ ] => $params{label_list}->[ $_ ] }
( 0 .. ( scalar @{ $params{field_list} } - 1 ) );
! $params{partition_label} = $lbl{ $params{partition_field} } || $params{partition_field};
}
! $params{lookup_list} = $class->_lookup_entries( $lookup_info, $params{partition_value} );
my $display_type = $R->apache->param( 'display_type' ) || DEFAULT_DISPLAY;
--- 119,142 ----
my %lbl = map { $params{field_list}->[ $_ ] => $params{label_list}->[ $_ ] }
( 0 .. ( scalar @{ $params{field_list} } - 1 ) );
! $params{partition_label} = $lbl{ $params{partition_field} } ||
! $params{partition_field};
}
! $params{lookup_list} = $class->_lookup_entries( $lookup_info,
! $params{partition_value} );
!
! # Check to see if the lookup action has defined a set of related
! # objects -- that is, the user when editing the lookup values
! # should choose one from many values.
!
! $lookup_info->{relate} ||= {};
! foreach my $field_name ( keys %{ $lookup_info->{relate} } ) {
! my $relate_info = $lookup_info->{relate}{ $field_name };
! next if ( $params{related}->{ $field_name } );
! $params{related}->{ $field_name } = $relate_info;
! $params{related}->{ $field_name }{list} = $class->_lookup_related_objects(
! $relate_info->{object},
! $relate_info );
! }
my $display_type = $R->apache->param( 'display_type' ) || DEFAULT_DISPLAY;
***************
*** 232,235 ****
--- 250,261 ----
}
return $lookup_class->fetch_group( \%args );
+ }
+
+
+ sub _lookup_related_objects {
+ my ( $class, $object_type, $params ) = @_;
+ my $R = OpenInteract::Request->instance;
+ return $R->$object_type()->fetch_group({ order => $params->{order} })
+
}
|