Skip to Content.
Sympa Menu

en - Re: [sympa-users] Patch: make Post button inactive if user can't send

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün - CRU <address@concealed>
  • To: Adam Bernstein <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-users] Patch: make Post button inactive if user can't send
  • Date: Mon, 24 Jan 2005 10:13:54 +0100

Hi Adam,

I've restored this piece of code as proposed.
It had been previously removed at a time when we could not evaluate an autorization scenario if without having the message in hand. In the meanwhile it has been fixed to skip scenario rules that could not be evaluated.

Thank you

Adam Bernstein wrote:

I think someone asked about this on the list long ago, and was told that the
order in which templates were loaded made it impossible to have the Post
button link depend on what permissions the user has. Something like that.
But I've just made a two-line modification (twice), and it seems to work
fine, so I'll make it available here as well as in the bug tracking system.
Hopefully it can be integrated.

In the two routines in wwsympa.fcgi, check_param_in() and check_param_out(),
where may_post is set to 1 currently, substitute these two lines for the one
line that does that:

#May post:
my $action = &List::request_action ('send',$param->{'auth_method'},$robot,
{'listname' => $param->{'list'},
'sender' => $param->{'user'}'email'},
'remote_host' => $param->{'remote_host'},
'remote_addr' => $param->{'remote_addr'}});
$param->{'may_post'} = 1 if ($action =~ /do_it/);


--
Olivier Salaün
Comité Réseau des Universités
-------------------------------------------
Validation signature / Trusting signature: --> http://igc.cru.fr/trust.html
-------------------------------------------

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.19+.

Top of Page