[Rt-commit] r7227 - rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Tue Mar 13 09:21:39 EDT 2007
Author: ruz
Date: Tue Mar 13 09:21:38 2007
New Revision: 7227
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Handle.pm
Log:
* move creating system user's ACLs to coredata
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Handle.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Handle.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Handle.pm Tue Mar 13 09:21:38 2007
@@ -462,6 +462,21 @@
print "$msg\n";
exit(-1);
}
+
+ print "Creating system user's ACL...";
+
+ my $CurrentUser = new RT::CurrentUser;
+ $CurrentUser->LoadByName('RT_System');
+
+ my $superuser_ace = RT::ACE->new( $CurrentUser );
+ $superuser_ace->_BootstrapCreate(
+ PrincipalId => ACLEquivGroupId( $CurrentUser->Id ),
+ PrincipalType => 'Group',
+ RightName => 'SuperUser',
+ ObjectType => 'RT::System',
+ ObjectId => 1,
+ );
+
print "done.\n";
$RT::Handle->Disconnect() unless $db_type eq 'SQLite';
}
@@ -481,21 +496,6 @@
my $CurrentUser = RT::CurrentUser->new();
$CurrentUser->LoadByName('RT_System');
- if ( $datafile eq $RT::EtcPath . "/initialdata" ) {
-
- print "Creating Superuser ACL...";
-
- my $superuser_ace = RT::ACE->new($CurrentUser);
- $superuser_ace->_BootstrapCreate(
- PrincipalId => ACLEquivGroupId( $CurrentUser->Id ),
- PrincipalType => 'Group',
- RightName => 'SuperUser',
- ObjectType => 'RT::System',
- ObjectId => '1' );
-
- print "done.\n";
- }
-
# Slurp in stuff to insert from the datafile. Possible things to go in here:-
our (@Groups, @Users, @ACL, @Queues, @ScripActions, @ScripConditions,
@Templates, @CustomFields, @Scrips, @Attributes, @Initial, @Final);
More information about the Rt-commit
mailing list