[Rt-commit] rt branch, 4.0-trunk, updated. rt-4.0.6-163-g4c8f01f

Kevin Falcone falcone at bestpractical.com
Fri Jun 8 16:43:06 EDT 2012


The branch, 4.0-trunk has been updated
       via  4c8f01fde5f14edd94a7ca2c42613fafacdbcdf6 (commit)
       via  244c807eddc839120bde2340d83f35489b683ee8 (commit)
      from  c08e344a5fc06ff9cbbd8ce56f04f6c3a5dd2f81 (commit)

Summary of changes:
 lib/RT/Scrip.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 4c8f01fde5f14edd94a7ca2c42613fafacdbcdf6
Merge: c08e344 244c807
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Jun 8 16:36:46 2012 -0400

    Merge branch '4.0/scrip-lastupdated' into 4.0-trunk

diff --cc lib/RT/Scrip.pm
index 0e0c7a0,4ea04c0..40b030c
--- a/lib/RT/Scrip.pm
+++ b/lib/RT/Scrip.pm
@@@ -517,31 -517,9 +517,31 @@@ sub _Set 
                  return ( 0, $self->loc('Permission Denied') );
              }
          }
 +        elsif ($args{Field} eq 'Queue') {
 +            if ($args{Value}) {
 +                # moving to another queue
 +                my $queue = RT::Queue->new( $self->CurrentUser );
 +                $queue->Load($args{Value});
 +                unless ($queue->Id and $queue->CurrentUserHasRight('ModifyScrips')) {
 +                    return ( 0, $self->loc('Permission Denied') );
 +                }
 +            } else {
 +                # moving to global
 +                unless ($self->CurrentUser->HasRight( Object => RT->System, Right => 'ModifyScrips' )) {
 +                    return ( 0, $self->loc('Permission Denied') );
 +                }
 +            }
 +        }
 +        elsif ($args{Field} eq 'Template') {
 +            my $template = RT::Template->new( $self->CurrentUser );
 +            $template->Load($args{Value});
 +            unless ($template->Id and $template->CurrentUserCanRead) {
 +                return ( 0, $self->loc('Permission Denied') );
 +            }
 +        }
      }
  
-     return $self->__Set(@_);
+     return $self->SUPER::_Set(@_);
  }
  
  

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


More information about the Rt-commit mailing list