[Bps-public-commit] r10823 - RT-Extension-SLA/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Wed Feb 13 23:24:25 EST 2008
Author: ruz
Date: Wed Feb 13 23:24:25 2008
New Revision: 10823
Modified:
RT-Extension-SLA/lib/RT/Queue_SLA.pm
Log:
* add ACL checks on queue
Modified: RT-Extension-SLA/lib/RT/Queue_SLA.pm
==============================================================================
--- RT-Extension-SLA/lib/RT/Queue_SLA.pm (original)
+++ RT-Extension-SLA/lib/RT/Queue_SLA.pm Wed Feb 13 23:24:25 2008
@@ -19,9 +19,8 @@
sub SLA {
my $self = shift;
my $value = shift;
+ return undef unless $self->CurrentUserHasRight('SeeQueue');
-# TODO: ACL check
-# return undef unless $self->CurrentUserHasRight('XXX');
my $attr = $self->FirstAttribute('SLA') or return undef;
return $attr->Content;
}
@@ -30,9 +29,8 @@
my $self = shift;
my $value = shift;
-# TODO: ACL check
-# return ( 0, $self->loc('Permission Denied') )
-# unless $self->CurrentUserHasRight('XXX');
+ return ( 0, $self->loc('Permission Denied') )
+ unless $self->CurrentUserHasRight('AdminQueue');
my ($status, $msg) = $self->SetAttribute(
Name => 'SLA',
@@ -40,7 +38,7 @@
Content => $value,
);
return ($status, $msg) unless $status;
- return ($status, $self->loc('Queue SLA changed'));
+ return ($status, $self->loc("Queue's default service level has been changed"));
}
1;
More information about the Bps-public-commit
mailing list