[Rt-commit] r13209 - in rt/branches/3.8-TESTING: .
sartak at bestpractical.com
sartak at bestpractical.com
Thu Jun 12 12:20:28 EDT 2008
Author: sartak
Date: Thu Jun 12 12:20:25 2008
New Revision: 13209
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm
Log:
r62266 at onn: sartak | 2008-06-12 12:05:54 -0400
Check in the API that the user may modify preferences. rt3.fsck.com #9578.
Modified: rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm Thu Jun 12 12:20:25 2008
@@ -1273,6 +1273,10 @@
my $self = shift;
my $name = _PrefName( shift );
my $value = shift;
+
+ return (0, $self->loc("No permission to set preferences"))
+ unless $self->CurrentUserCanModify('Preferences');
+
my $attr = RT::Attribute->new( $self->CurrentUser );
$attr->LoadByNameAndObject( Object => $self, Name => $name );
if ( $attr->Id ) {
More information about the Rt-commit
mailing list