[Rt-commit] rt branch, 4.0/initialdata-group-domain, created. rt-4.0.8-106-g2e3dde7
Alex Vandiver
alexmv at bestpractical.com
Wed Mar 6 19:30:54 EST 2013
The branch, 4.0/initialdata-group-domain has been created
at 2e3dde786a8b92a54d77dae84a35850a4215f616 (commit)
- Log -----------------------------------------------------------------
commit 55edaf59e474c2dbc8b2a1c5f47348f1d8c60a7c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Mar 2 14:52:50 2011 +0300
self-redirect Jumbo page after update
If we don't do this then message box contains
previous message and submiting the form will
result in a duplicated message.
Sure, without this change refresh resubmits
previous request.
diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
index 8619cd5..9c20e80 100755
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@ -214,6 +214,12 @@ unless ($OnlySearchForPeople or $OnlySearchForGroup or $ARGS{'AddMoreAttach'} )
$Ticket->ApplyTransactionBatch;
+MaybeRedirectForResults(
+ Actions => \@results,
+ Path => "/Ticket/ModifyAll.html",
+ Arguments => { id => $Ticket->id },
+);
+
# If they've gone and moved the ticket to somewhere they can't see, etc...
# TODO: display the results, even if we can't display the ticket.
commit 4587263346226c9cc71172d205f29664a9d50163
Merge: 839f1f1 55edaf5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Nov 2 17:06:39 2012 -0400
Merge branch '4.0/clean-jumbo-message-box' into 4.0-trunk
diff --cc share/html/Ticket/ModifyAll.html
index a645c81,9c20e80..4b58b8d
mode 100644,100755..100644
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@@ -214,16 -214,20 +214,21 @@@ unless ($OnlySearchForPeople or $OnlySe
$Ticket->ApplyTransactionBatch;
+# If they've gone and moved the ticket to somewhere they can't see, etc...
+unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
+ if (@results) {
+ Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@results);
+ } else {
+ Abort("No permission to view ticket");
+ }
+}
+
+ MaybeRedirectForResults(
+ Actions => \@results,
+ Path => "/Ticket/ModifyAll.html",
+ Arguments => { id => $Ticket->id },
+ );
-# If they've gone and moved the ticket to somewhere they can't see, etc...
-# TODO: display the results, even if we can't display the ticket.
-
-unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
- Abort("No permission to view ticket");
-}
-
-
</%INIT>
commit 2e3dde786a8b92a54d77dae84a35850a4215f616
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 03c262b..b01b572 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -774,6 +774,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