[Bps-public-commit] rt-extension-notificationmatrix branch, master, updated. 689d8506167d1fb4491c744fc55e9c348f690e84
Chia-liang Kao
clkao at bestpractical.com
Thu Jul 15 22:56:03 EDT 2010
The branch, master has been updated
via 689d8506167d1fb4491c744fc55e9c348f690e84 (commit)
from f54acfa51a16fe0ea9880b59a3f1510fa413e351 (commit)
Summary of changes:
html/Admin/Queues/NotificationMatrix.html | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 689d8506167d1fb4491c744fc55e9c348f690e84
Author: Chia-liang Kao <clkao at clkao.org>
Date: Fri Jul 16 10:56:55 2010 +0800
acl and result messages.
diff --git a/html/Admin/Queues/NotificationMatrix.html b/html/Admin/Queues/NotificationMatrix.html
index 252ed5a..b623972 100644
--- a/html/Admin/Queues/NotificationMatrix.html
+++ b/html/Admin/Queues/NotificationMatrix.html
@@ -4,6 +4,8 @@
current_tab => 'Admin/Queues/NotificationMatrix.html?id='.$id,
Title => $title &>
+<& /Elements/ListActions, actions => \@results &>
+
<style type="text/css" media="screen">
table.notification-matrix tr.sep {
border: 0 0 1 0 #000000 solid;
@@ -115,6 +117,7 @@ if ($QueueObj->id) {
my $Groups = RT::Groups->new($session{'CurrentUser'});
$Groups->LimitToRolesForQueue($QueueObj->Id);
+my @results;
my @groups = @{ $Groups->ItemsArrayRef };
my @user_groups;
my @actions = qw(TicketCreated TicketCommented TicketTaken TicketResolved TicketUpdatedExternally QueueChanged);
@@ -145,6 +148,15 @@ if ($ARGS{SetMatrix}) {
$matrix->{$action} = [ map { $ARGS{"NM-$action-$_"} eq 'include' ? $_ : -$_ }
map { s/NM-\Q$action\E-// ? $_ : () } keys %ARGS ]
}
+
+ if ( $session{'CurrentUser'}->HasRight(Right => 'AdminQueue', Object => $RT::System) ) {
+ # XXX: setattribute always returns 1, there's no way to see if the AddAttribute actually worked
+ $QueueObj->SetAttribute(Name => 'NotificationMatrix', Description => 'Notification Matrix Internal Data', Content => $matrix);
+ push @results, loc("Notification saved");
+ }
+ else {
+ push @results, loc("No permission to create queues");
+ }
$QueueObj->SetAttribute(Name => 'NotificationMatrix', Description => 'Notification Matrix Internal Data', Content => $matrix);
}
else {
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list