[Rt-commit] rt branch, 4.0/context-on-custom-fields, created. rt-4.0.4-42-g31ecb9d

Ruslan Zakirov ruz at bestpractical.com
Tue Nov 22 08:53:22 EST 2011


The branch, 4.0/context-on-custom-fields has been created
        at  31ecb9d5852632d09c0a9506e0c36ff3bd04806c (commit)

- Log -----------------------------------------------------------------
commit 31ecb9d5852632d09c0a9506e0c36ff3bd04806c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Nov 22 17:48:53 2011 +0400

    without context on CFs rights on queues don't work
    
    For example date field gets flushed to no value when
    value is not changed on the basics page. To reproduce
    this See/Modify CustomFields rights should be granted
    on queue level, not globally or directly on the custom
    field.

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index c880115..1c3f758 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -2168,6 +2168,7 @@ sub ProcessObjectCustomFieldUpdates {
 
             foreach my $cf ( keys %{ $custom_fields_to_mod{$class}{$id} } ) {
                 my $CustomFieldObj = RT::CustomField->new( $session{'CurrentUser'} );
+                $CustomFieldObj->SetContextObject($Object);
                 $CustomFieldObj->LoadById($cf);
                 unless ( $CustomFieldObj->id ) {
                     $RT::Logger->warning("Couldn't load custom field #$cf");

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


More information about the Rt-commit mailing list