[Rt-commit] rt branch, 4.0/initialdata-group-domain, created. rt-4.0.10-73-ge4e5c4f
Alex Vandiver
alexmv at bestpractical.com
Wed Mar 6 19:37:01 EST 2013
The branch, 4.0/initialdata-group-domain has been created
at e4e5c4f1ecef65d2abe3d43fa3d9136998a2d562 (commit)
- Log -----------------------------------------------------------------
commit e4e5c4f1ecef65d2abe3d43fa3d9136998a2d562
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Nov 2 16:32:50 2012 -0400
Default Domain to UserDefined, which is the only sane value
diff --git a/docs/initialdata.pod b/docs/initialdata.pod
index 6445fb0..3f271e9 100644
--- a/docs/initialdata.pod
+++ b/docs/initialdata.pod
@@ -78,14 +78,13 @@ For a full list of fields, read the documentation for L<RT::User/Create>.
=head2 C<@Groups>
push @Groups, {
- Domain => 'UserDefined',
Name => 'Example Employees',
Description => 'All of the employees of my company',
};
Creates a new L<RT::Group> for each hashref. In almost all cases you'll want
to follow the example above to create a group just as if you had done it from
-the admin interface. B<Do not> omit the C<< Domain => 'UserDefined' >> line.
+the admin interface.
Additionally, the C<MemberOf> field is specially handled to make it easier to
add the new group to other groups. C<MemberOf> may be a single value or an
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 0a1d61e..23a017c 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -780,6 +780,7 @@ sub InsertData {
$RT::Logger->debug("Creating groups...");
foreach my $item (@Groups) {
my $new_entry = RT::Group->new( RT->SystemUser );
+ $item->{'Domain'} ||= 'UserDefined';
my $member_of = delete $item->{'MemberOf'};
my ( $return, $msg ) = $new_entry->_Create(%$item);
unless ( $return ) {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list