[rt-users] [PATCH REQ for 4.2.2] callback for Modify.html

Alexander Reintzsch alexander.reintzsch at netsystem.de
Tue Nov 26 09:39:31 EST 2013


Hi,

sorry for capturing this thread, but same request different file. 
Reason is, that the callback cannot set the Privileged flag, so no 
matter what happens in the callback BeforeUpdate, the user's Privileged 
flag cannot be modified. This patch fixes the problem. It'd be awesome 
if you could patch it in the next version. Thank you very much.

--- share/html/Admin/Users/Modify.html	2013-07-30 14:24:52.000000000 
+0200
+++ local/html/Admin/Users/Modify.html	2013-11-26 15:27:27.000000000 
+0100
@@ -298,7 +298,7 @@
 }


-$m->callback( %ARGS, CallbackName => 'BeforeUpdate', User => $UserObj, 
ARGSRef => \%ARGS, Results => \@results );
+$m->callback( %ARGS, CallbackName => 'BeforeUpdate', User => $UserObj, 
ARGSRef => \%ARGS, Results => \@results, SetPrivileged => 
\$SetPrivileged );


 # If we have a user to modify, lets try.


Cheers,
Alex



Am Di 26 Nov 2013 13:58:47 CET schrieb Arkadiusz Miśkiewicz:
>
> Hi.
>
> Update.html contains nice callback for various tasks (like checking form
> fields etc):
>  $m->callback( CallbackName => 'BeforeUpdate', ARGSRef => \%ARGS, skip_update
>                => \$skip_update, ...
>
> but Modify.html doesn't have such thing.
>
> Was there any reason for not adding BeforeModify callback in Modify.html? It's
> logical to have the same sets of callbacks for similar actions IMO.
>
> This patch below works (hand made, line wrapped, so likely won't apply
> directly). Please add such modification to 4.2.2. Thanks.
>
> --- html/Ticket/Modify.html~   2013-11-25 10:25:50.000000000 +0100
> +++ html/Ticket/Modify.html    2013-11-26 13:36:25.847864830 +0100
> @@ -77,6 +77,9 @@
>  my @results;
>  my $skip_update = 0;
>
> +$m->callback( CallbackName => 'BeforeModify', ARGSRef => \%ARGS, skip_update
> => \$skip_update,
> +              results => \@results, TicketObj => $TicketObj );
> +
>  # Now let callbacks have a chance at editing %ARGS
>  $m->callback( TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef
> => \%ARGS, skip_update => \$skip_update );
>



-------------- next part --------------
A non-text attachment was scrubbed...
Name: alexander_reintzsch.vcf
Type: text/x-vcard
Size: 387 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20131126/e6d41086/attachment.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20131126/e6d41086/attachment.sig>


More information about the rt-users mailing list