[Rt-commit] rt branch, new-style-templates, updated. rt-3.8.8-205-gfa41e07

Shawn Moore sartak at bestpractical.com
Fri Jul 23 20:26:38 EDT 2010


The branch, new-style-templates has been updated
       via  fa41e0756a5a10c9c3414f6fc36571d498db4e16 (commit)
      from  f7a09efe3c878f094b8bf2255f5d0a5462f24fb8 (commit)

Summary of changes:
 lib/RT/Template_Overlay.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit fa41e0756a5a10c9c3414f6fc36571d498db4e16
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Jul 23 20:28:18 2010 -0400

    Use Queue methods for rights checking

diff --git a/lib/RT/Template_Overlay.pm b/lib/RT/Template_Overlay.pm
index 81c26bf..89fe885 100755
--- a/lib/RT/Template_Overlay.pm
+++ b/lib/RT/Template_Overlay.pm
@@ -576,7 +576,7 @@ sub SetType {
     my $self    = shift;
     my $NewType = shift;
 
-    if ($NewType eq 'Full' && !$self->CurrentUser->HasRight(Right => 'FullTemplates', Object => $self->QueueObj) ) {
+    if ($NewType eq 'Full' && !$self->CurrentUserHasQueueRight('FullTemplates')) {
         return ( undef, $self->loc('Permission Denied') );
     }
 
@@ -599,7 +599,7 @@ sub SetQueue {
     my $NewQueueObj = RT::Queue->new( $self->CurrentUser );
     $NewQueueObj->Load($NewQueue);
 
-    if ( $self->Type eq 'Full' && !$self->CurrentUser->HasRight(Right => 'FullTemplates', Object => $NewQueueObj) ) {
+    if ( $self->Type eq 'Full' && !$NewQueueObj->CurrentUserHasRight('FullTemplates') ) {
         return ( undef, $self->loc('Permission Denied. You do not have FullTemplate on the new queue.') );
     }
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list