[Rt-commit] r13118 - in rt/branches/3.8-TESTING: share/html/Install

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jun 10 14:34:37 EDT 2008


Author: sunnavy
Date: Tue Jun 10 14:34:37 2008
New Revision: 13118

Added:
   rt/branches/3.8-TESTING/share/html/Install/Password.html
Modified:
   rt/branches/3.8-TESTING/lib/RT/Installer.pm
   rt/branches/3.8-TESTING/share/html/Install/Basics.html
   rt/branches/3.8-TESTING/share/html/Install/DatabaseDetails.html
   rt/branches/3.8-TESTING/share/html/Install/DatabaseType.html
   rt/branches/3.8-TESTING/share/html/Install/Emails.html
   rt/branches/3.8-TESTING/share/html/Install/Finish.html
   rt/branches/3.8-TESTING/share/html/Install/Initialize.html
   rt/branches/3.8-TESTING/share/html/Install/Sendmail.html

Log:
+ added Password meta info in Installer.pm
+ added Install/Password.html for customizing root's password
* moved MinimumPasswordLength to Password.html page
- deleted 'Step .:' string from titles
* we need to click the 'Finish: ...' button to get password be changed. (is there a better place to go?)


Modified: rt/branches/3.8-TESTING/lib/RT/Installer.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Installer.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/Installer.pm	Tue Jun 10 14:34:37 2008
@@ -147,6 +147,13 @@
             Description => 'Minimum password length',         #loc
         },
     },
+    Password => {
+        Widget          => '/Widgets/Form/String',
+        WidgetArguments => {
+            Description => 'password of the user root',         #loc
+            Type => 'password',
+        },
+    },
     MaxAttachmentSize => {
         Widget          => '/Widgets/Form/Integer',
         WidgetArguments => {
@@ -273,6 +280,9 @@
 
     if ( open my $fh, '>', $file  ) {
         for ( keys %{$RT::Installer->{InstallConfig}} ) {
+            # we don't want to store root's password in config.
+            next if $_ eq 'Password';
+
             if (defined $RT::Installer->{InstallConfig}{$_}) {
                 # remove obsolete settings we'll add later
                 $content =~ s/^\s* Set \s* \( \s* \$$_ .*$//xm;

Modified: rt/branches/3.8-TESTING/share/html/Install/Basics.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Install/Basics.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Install/Basics.html	Tue Jun 10 14:34:37 2008
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&| Elements/Wrapper, Title => 'Step 3: Customize Basics' &> 
+<&| Elements/Wrapper, Title => 'Customize Basics' &> 
 
 <& /Elements/ListActions, actions => \@results &>
 
@@ -54,7 +54,7 @@
     CurrentValue => RT::Installer->CurrentValues(@Types) &>
 
 <input type="hidden" name="Run" value="1">
-<& /Elements/Submit, Label => loc('Next: Customize Email Addresses'), Back => 1,
+<& /Elements/Submit, Label => loc('Next: Customize Password'), Back => 1,
     BackLabel => loc('Back: Customize Database Details') &>
 </form>
 </&>
@@ -63,8 +63,7 @@
 <%init>
 my @results;
 
-my @Types = qw/rtname Organization WebDomain WebPort 
-                MinimumPasswordLength Timezone/;
+my @Types = qw/rtname Organization WebDomain WebPort Timezone/;
 
 if ( $Run ) {
 
@@ -72,7 +71,7 @@
             Store => $RT::Installer->{InstallConfig},
             Meta => $RT::Installer->{Meta} );
     
-    for ( qw/MininumPasswordLength WebPort/ ) {
+    for ( qw/WebPort/ ) {
         if ( $ARGS{$_} && $ARGS{$_} !~ /^\d+$/ ) {
             push @results, "Invalid $_: it should be a number";
         }
@@ -85,7 +84,7 @@
 
     unless ( @results ) {
         RT::Interface::Web::Redirect(RT->Config->Get('WebURL') .
-'Install/Emails.html');
+'Install/Password.html');
     }
 }
 

Modified: rt/branches/3.8-TESTING/share/html/Install/DatabaseDetails.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Install/DatabaseDetails.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Install/DatabaseDetails.html	Tue Jun 10 14:34:37 2008
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&| Elements/Wrapper, Title => 'Step 2: Check your database credentials' &> 
+<&| Elements/Wrapper, Title => 'Check your database credentials' &> 
 
 <& /Elements/ListActions, actions => \@results &>
 

Modified: rt/branches/3.8-TESTING/share/html/Install/DatabaseType.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Install/DatabaseType.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Install/DatabaseType.html	Tue Jun 10 14:34:37 2008
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&|Elements/Wrapper, Title => 'Step 1: Choose a database engine' &>
+<&|Elements/Wrapper, Title => 'Choose a database engine' &>
 
 <& /Elements/ListActions, actions => \@results &>
 

Modified: rt/branches/3.8-TESTING/share/html/Install/Emails.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Install/Emails.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Install/Emails.html	Tue Jun 10 14:34:37 2008
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&| Elements/Wrapper, Title => 'Step 4: Customize Email Addresses' &> 
+<&| Elements/Wrapper, Title => 'Customize Email Addresses' &> 
 
 <& /Elements/ListActions, actions => \@results &>
 
@@ -63,7 +63,7 @@
 
 <input type="hidden" name="Run" value="1">
 <& /Elements/Submit, Label => loc('Next: Email Configuration'), Back => 1,
-    BackLabel => loc('Back: Customize Basics') &>
+    BackLabel => loc('Back: Customize Password') &>
 </form>
 </&>
 <%init>
@@ -83,7 +83,7 @@
 
     if ( $Back ) {
         RT::Interface::Web::Redirect(RT->Config->Get('WebURL') .
-'Install/Basics.html');
+'Install/Password.html');
     }
 
     unless ( @results ) {

Modified: rt/branches/3.8-TESTING/share/html/Install/Finish.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Install/Finish.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Install/Finish.html	Tue Jun 10 14:34:37 2008
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&| Elements/Wrapper, Title => 'Step 7: Finish' &> 
+<&| Elements/Wrapper, Title => 'Finish' &> 
 
 <div class="intro">
 <p>
@@ -53,8 +53,12 @@
 </p>
 
 <p>
+But if not, just click "Finish Installation" below. You should be taken directly
+to a login page. You'll be able to log in with username of <tt>root</tt>. 
+</p>
+
+<p>
 If you've changed web port, you have to restart the server.
-But if not, just click "Begin RT Journey!" below. You should be taken directly to a login page. You'll be able to log in with a username of <tt>root</tt> and <tt>password</tt>.
 </p>
 
 <p>
@@ -67,7 +71,7 @@
 
 <form method="post">
 <input type="hidden" value="1" name="Run" />
-<& /Elements/Submit, Label => 'Begin RT Journey!' &>
+<& /Elements/Submit, Label => 'Finish Installation' &>
 </form>
 
 </&>
@@ -78,6 +82,11 @@
     RT->InitSystemObjects();
     RT->InitClasses();
     RT->InitPlugins();
+
+    my $root = RT::User->new( $RT::SystemUser );
+    $root->Load('root');
+    $root->SetPassword( $RT::Installer->{InstallConfig}{Password} );
+
     RT::Interface::Web::Redirect(RT->Config->Get('WebURL'));
 }
 </%init>

Modified: rt/branches/3.8-TESTING/share/html/Install/Initialize.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Install/Initialize.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Install/Initialize.html	Tue Jun 10 14:34:37 2008
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&|Elements/Wrapper, Title => 'Step 6: Initialize Database' &> 
+<&|Elements/Wrapper, Title => 'Step 7: Initialize Database' &> 
 
 <& /Elements/ListActions, actions => \@results &>
 

Added: rt/branches/3.8-TESTING/share/html/Install/Password.html
==============================================================================
--- (empty file)
+++ rt/branches/3.8-TESTING/share/html/Install/Password.html	Tue Jun 10 14:34:37 2008
@@ -0,0 +1,101 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%#  
+%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC 
+%#                                          <jesse at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+<&| Elements/Wrapper, Title => 'Customize Password' &> 
+
+<& /Elements/ListActions, actions => \@results &>
+
+<form method="post">
+<& /Widgets/BulkEdit, Types => \@Types,Meta => $RT::Installer->{Meta},
+    CurrentValue => RT::Installer->CurrentValues(@Types) &>
+
+<input type="hidden" name="Run" value="1">
+<& /Elements/Submit, Label => loc('Next: Customize Email Addresses'), Back => 1,
+    BackLabel => loc('Back: Customize Basics') &>
+</form>
+</&>
+
+
+<%init>
+my @results;
+
+my @Types = qw/MinimumPasswordLength Password/;
+
+if ( $Run ) {
+
+    $m->comp('/Widgets/BulkProcess', Types => \@Types, Arguments => \%ARGS,
+            Store => $RT::Installer->{InstallConfig},
+            Meta => $RT::Installer->{Meta} );
+
+    
+    for ( qw/MininumPasswordLength/ ) {
+        if ( $ARGS{$_} && $ARGS{$_} !~ /^\d+$/ ) {
+            push @results, "Invalid $_: it should be a number";
+        }
+    }
+
+    if ( length $ARGS{Password} < $ARGS{MinimumPasswordLength} ) {
+        push @results, "password is at least $ARGS{MinimumPasswordLength} characters";
+    }
+
+    if ( $Back ) {
+        RT::Interface::Web::Redirect(RT->Config->Get('WebURL') .
+'Install/Basics.html');
+    }
+
+    unless ( @results ) {
+        RT::Interface::Web::Redirect(RT->Config->Get('WebURL') .
+'Install/Emails.html');
+    }
+}
+
+</%init>
+
+<%args>
+$Run => undef
+$Back => undef
+</%args>

Modified: rt/branches/3.8-TESTING/share/html/Install/Sendmail.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Install/Sendmail.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Install/Sendmail.html	Tue Jun 10 14:34:37 2008
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&|Elements/Wrapper, Title => 'Step 5: Email Configuration' &> 
+<&|Elements/Wrapper, Title => 'Email Configuration' &> 
 
 <& /Elements/ListActions, actions => \@results &>
 


More information about the Rt-commit mailing list