[Rt-commit] [svn] r1736 - in rt/branches/3.3-TESTING: . lib/RT

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Sun Nov 7 10:04:54 EST 2004


Author: jesse
Date: Sun Nov  7 10:04:54 2004
New Revision: 1736

Modified:
   rt/branches/3.3-TESTING/   (props changed)
   rt/branches/3.3-TESTING/lib/RT/CustomField_Overlay.pm
Log:
 r6196 at tinbook:  jesse | 2004-11-07T03:37:32.303504Z
 Squash warnings when trying to check acls on nonexisten custom fields
 


Modified: rt/branches/3.3-TESTING/lib/RT/CustomField_Overlay.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/CustomField_Overlay.pm	(original)
+++ rt/branches/3.3-TESTING/lib/RT/CustomField_Overlay.pm	Sun Nov  7 10:04:54 2004
@@ -348,21 +348,18 @@
 
 =cut
 
+*ValuesObj = \&Values;
+
 sub Values {
     my $self = shift;
 
     my $cf_values = RT::CustomFieldValues->new($self->CurrentUser);
-    if ( $self->CurrentUserHasRight( 'SeeCustomField') ) {
+    if ($self->id && $self->CurrentUserHasRight( 'SeeCustomField') ) {
         $cf_values->LimitToCustomField($self->Id);
     }
     return ($cf_values);
 }
 
-sub ValuesObj {
-    my $self = shift;
-    return $self->Values(@_);
-}
-
 # }}}
 
 # }}}
@@ -674,8 +671,8 @@
     my $field = shift;
 
     # we need to do the rights check
-    unless ( $self->CurrentUserHasRight( 'SeeCustomField') ) {
-	return (undef);
+    unless ( $self->id && $self->CurrentUserHasRight( 'SeeCustomField') ) {
+	    return (undef);
     }
     return ( $self->__Value($field) );
 


More information about the Rt-commit mailing list