Is it possible to allow a user to edit a custom field, without being
able to see it’s value? My testing looks like ModifyCustomField is not
enough for the field to show up in the update page, and SeeCustomField
my also be checked?
w.
Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
Is it possible to allow a user to edit a custom field, without being able to
see it’s value? My testing looks like ModifyCustomField is not enough for
the field to show up in the update page, and SeeCustomField my also be
checked?
You can always hack around that “limitation” with the callbacks.
I did not succeed in working out how to get around it by using
callbacks, but instead added some code to remove the values if the user
is a member of some group.
I did this hack, which might be useful to someone someday
note i only edited the Freeform custom field file as that’s all i needed
and i preserved the oldvalue in the oldvalue= argument
in local/html/Elements/ShowCustomField line 53
% while ( my $CustomField = $CustomFields->Next ) {
% my $Values = $Object->CustomFieldValues( $CustomField->Id );
% my $count = $Values->Count;
% next if $HideEmpty and not $count;
%# skip if member of group “NoSeeCF”
% my $group = new RT::Group($RT::SystemUser);
% $group->LoadUserDefinedGroup(“NoSeeCF”);
% next if ($group->HasMember($session{‘CurrentUser’}->PrincipalObj) );
<% $CustomField->Name %>:
in local/html/Elements/EditCustomFieldFreeForm line 52
% if ( defined $Cols ) {
size=“<% $Cols %>”
% }
%# remove value if member of NoSeeCF
% my $group = new RT::Group($RT::SystemUser);
% $group->LoadUserDefinedGroup(“NoSeeCF”);
% if ($group->HasMember($session{‘CurrentUser’}->PrincipalObj) ) {
class=“CF-<%$CustomField->id%>-Edit” oldvalue=“<% defined($Default) ?
$Default : ‘’%>” value=“” />
% } else {
class=“CF-<%$CustomField->id%>-Edit” value=“<% defined($Default) ?
$Default : ‘’%>” />
% }
Is it possible to allow a user to edit a custom field, without being able to
see it’s value? My testing looks like ModifyCustomField is not enough for
the field to show up in the update page, and SeeCustomField my also be
checked?
You can always hack around that “limitation” with the callbacks.