[Rt-commit] rt branch, master, updated. rt-4.0.4-227-gcdb4d7e
Alex Vandiver
alexmv at bestpractical.com
Tue Nov 29 14:18:53 EST 2011
The branch, master has been updated
via cdb4d7ecc457ad72a34ce8d584240651c1da3b84 (commit)
via 69e2ec6767dbc8991b1ebf1810f3fcb11ec0bb83 (commit)
from f5219d42e3fde5e23eae69d44bc7387acc356f6e (commit)
Summary of changes:
share/html/Admin/CustomFields/Modify.html | 15 +++++++++++++++
share/html/Elements/Tabs | 4 +++-
2 files changed, 18 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit cdb4d7ecc457ad72a34ce8d584240651c1da3b84
Merge: f5219d4 69e2ec6
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Nov 29 14:14:22 2011 -0500
Merge branch '4.2/auto-apply-user-group-cfs-globally'
Conflicts:
share/html/Admin/CustomFields/Modify.html
diff --cc share/html/Admin/CustomFields/Modify.html
index 6881f41,d22c28c..8a54b21
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@@ -273,8 -263,26 +273,23 @@@ CustomFieldObj => $CustomFieldObj, Cust
}
}
+ if ( $CustomFieldObj->id && $CustomFieldObj->LookupType =~ /^RT::(?:User|Group)$/ ) {
+ my ( $ret, $msg );
+ my $object = $CustomFieldObj->RecordClassFromLookupType->new( $session{'CurrentUser'} );
+
+ if ( $CustomFieldObj->Disabled && $CustomFieldObj->IsApplied(0) ) {
+ ( $ret, $msg ) = $CustomFieldObj->RemoveFromObject($object);
+ }
+ elsif ( !$CustomFieldObj->Disabled && !$CustomFieldObj->IsApplied(0) ) {
+ ( $ret, $msg ) = $CustomFieldObj->AddToObject($object);
+ }
+
+ # successful msg("object created" or "object deleted ) is useless here
+ push @results, $msg unless $ret;
+ }
+
-
-
$id = $CustomFieldObj->id if $CustomFieldObj->id;
-
# This code does automatic redirection if any updates happen.
MaybeRedirectForResults(
Actions => \@results,
diff --cc share/html/Elements/Tabs
index 7255499,4d856b2..333a1ac
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@@ -354,7 -354,10 +354,9 @@@ my $build_admin_menu = sub
$tabs->child( 'group-rights' => title => loc('Group Rights') => path => "/Admin/CustomFields/GroupRights.html?id=" . $id );
$tabs->child( 'user-rights' => title => loc('User Rights') => path => "/Admin/CustomFields/UserRights.html?id=" . $id );
- $tabs->child( 'applies-to' => title => loc('Applies to'), path => "/Admin/CustomFields/Objects.html?id=" . $id );
-
+ unless ( $obj->LookupType =~ /^RT::(?:User|Group)$/ ) {
+ $tabs->child( 'applies-to' => title => loc('Applies to'), path => "/Admin/CustomFields/Objects.html?id=" . $id );
+ }
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list