[Rt-commit] rt branch, 4.2/web-installer, created. rt-4.2.1-158-gdddeb8b
Alex Vandiver
alexmv at bestpractical.com
Mon Jan 6 18:21:34 EST 2014
The branch, 4.2/web-installer has been created
at dddeb8bda66f1074d44871a078dbb93d46d5f197 (commit)
- Log -----------------------------------------------------------------
commit 2b52ff6203be8cc0ff0af3b9c90131d4b6c771f8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Oct 4 13:01:07 2013 -0400
Don't print anything to STDOUT during ACL granting
When run under the web installer, output to STDOUT is displayed in the
browser. This led to "Granting access to ..." being displayed atop the
menu during the database initialization step.
MySQL is the only database type whose ACL tries to display output when
successful. As 'rt-setup-database' provides sufficient updates as to
what is going on, an the specific GRANT being run is mostly irrelevant,
omit the warning entirely. Switch to using the existing logging
infrastructure for the true warnings.
diff --git a/etc/acl.mysql b/etc/acl.mysql
index 1688237..7e56e97 100755
--- a/etc/acl.mysql
+++ b/etc/acl.mysql
@@ -5,14 +5,13 @@ sub acl {
my $db_user = RT->Config->Get('DatabaseUser');
my $db_pass = RT->Config->Get('DatabasePassword');
unless ( $db_user ) {
- print STDERR "DatabaseUser option is not defined or empty. Skipping...\n";
+ RT->Logger->warn("DatabaseUser option is not defined or empty. Skipping...");
return;
}
if ( $db_user eq 'root' ) {
- print STDERR "DatabaseUser is root. Skipping...\n";
+ RT->Logger->warn("DatabaseUser is root. Skipping...");
return;
}
- print "Granting access to $db_user\@'$db_rthost' on $db_name.\n";
$db_name =~ s/([_%])/\\$1/g;
return (
"GRANT SELECT,INSERT,CREATE,INDEX,UPDATE,DELETE
commit dddeb8bda66f1074d44871a078dbb93d46d5f197
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Oct 4 13:02:05 2013 -0400
Ensure that all classes (and thus roles) are loaded prior to bootstrap
Bootstrapping involves creating some global role groups. However, role
group creation now checks the metadata on which roles are allowed on
which objects. As the core RT classes have not been loaded,
RT::System->Roles is empty, so creation of global role groups fails with
"ERROR: Invalid Group Name and Domain"
Load RT classes prior to inserting bootstrapping data, to ensure that
all roles are known. t/web/install.t and t/web/installer.t did not
catch this failure because they both fork a Plack server, which inherits
all of the already-loaded modules from RT::Test -- and as such, all
roles had always already been loaded.
diff --git a/share/html/Install/Initialize.html b/share/html/Install/Initialize.html
index 468662b..0fe40dc 100644
--- a/share/html/Install/Initialize.html
+++ b/share/html/Install/Initialize.html
@@ -119,6 +119,7 @@ if ( $Run ) {
$RT::Handle->dbh( undef );
RT::ConnectToDatabase();
RT::InitLogging();
+ RT::InitClasses();
($status, $msg) = $RT::Handle->InsertInitialData;
}
elsif ( $action eq 'insert' ) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list