[Rt-commit] r11217 - rt/branches/3.8-TESTING/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Wed Mar 26 21:12:26 EDT 2008


Author: ruz
Date: Wed Mar 26 21:12:26 2008
New Revision: 11217

Modified:
   rt/branches/3.8-TESTING/lib/RT/Handle.pm

Log:
* more errors handling

Modified: rt/branches/3.8-TESTING/lib/RT/Handle.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Handle.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/Handle.pm	Wed Mar 26 21:12:26 2008
@@ -513,7 +513,6 @@
 
 sub InsertInitialData {
     my $self    = shift;
-    my $db_type = RT->Config->Get('DatabaseType');
 
     #Put together a current user object so we can create a User object
     require RT::CurrentUser;
@@ -562,14 +561,15 @@
             push @warns, "System user has global SuperUser right.";
             
         } else {
-            my $superuser_ace = RT::ACE->new( $CurrentUser );
-            $superuser_ace->_BootstrapCreate(
+            my $ace = RT::ACE->new( $CurrentUser );
+            my ( $val, $msg ) = $ace->_BootstrapCreate(
                 PrincipalId   => ACLEquivGroupId( $CurrentUser->Id ),
                 PrincipalType => 'Group',
                 RightName     => 'SuperUser',
                 ObjectType    => 'RT::System',
                 ObjectId      => 1,
             );
+            return ($val, $msg) unless $val;
         }
         DBIx::SearchBuilder::Record::Cachable->FlushCache;
     }


More information about the Rt-commit mailing list