Mailing List Archive

Only user with SuperUser rights can see Modify who receives mail for ticket
Hello,

I would like that this piece of code in the ModifyPeople.html File is executable only for user with SuperUser rights.

I tried to use the code without sucess

+if ($UserObj->CurrentUserHasRight('SuperUser')) {
<p>
<&|/l&>The checked users may receive email related to this ticket depending on the action taken. Uncheck users to stop sending email to them about this ticket.</&>
</p>

<ul>
% for my $addr (sort keys %recips) {
<li>
<input type="hidden" name="autorecipient" value="<% $addr %>">
<input type="checkbox" name="checked_recipient" id="checked_recipient_<%$addr%>" value="<%$addr%>" <% $recips{$addr} ? "checked" : "" %>>
<label for="checked_recipient_<%$addr%>"><& /Elements/ShowUser, Address => Email::Address->parse($addr) &></label>
</li>
% }
+}

Thank you very much!
Re: Only user with SuperUser rights can see Modify who receives mail for ticket [ In reply to ]
Le 10/10/2016 à 18:00, Tobi hfhf a écrit :
>
> Hello,
>
>
>
> I would like that this piece of code in the ModifyPeople.html File is
> executable only for user with SuperUser rights.
>
>
>
> I tried to use the code without sucess
>
>
>
> +if ($UserObj->CurrentUserHasRight('SuperUser')) {
>
it's perl code, so you're missing a "%" sign here.

> +}
>

here too.

don't forget to clear the mason cache before testing again.


--
Easter-eggs Spécialiste GNU/Linux
44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com