#41 Disallowed preferences should be greyed out in the WebUI

open
nobody
webui (9)
5
2009-08-26
2009-08-26
Julien Valroff
No

Hi,

It seems quite misleading for the user that a disallowed preference is accessible from the WebUI.
It should better be greyed out.

Cheers,
Julien

Discussion

  • Julien Valroff
    Julien Valroff
    2009-08-26

     
    Attachments
  • Julien Valroff
    Julien Valroff
    2009-08-26

    I will be able to provide a patch implementing this, but would like to know if there is a better way to get AllowOverride entries than parsing the config file from the CGI's?

    This way works, but we are not sure these are the current parameters (they can have been changed but daemon not reloaded).

    Cheers,
    Julien

     
  • Julien Valroff
    Julien Valroff
    2009-08-26

    I see dspam_notify.pl uses the following code to detect an AllowOverride:
    chomp($ALLOW_OVERRIDE = `dspam_admin agg pref 'default' 2>&1 | grep -i -c "Ignoring disallowed preference 'dailyQuarantineSummary'"`);

    This code cannot work as the error is sent to syslog and not to stdout/stderr.

    Would it be possible to add a --list-allowed-overrides option to dspam_admin (read-only of course)? This would simply list allowed overrides values (one on each line, to be easy to parse), eg:
    trainingMode
    spamAction
    spamSubject
    dailyQuarantineSummary

    Cheers,
    Julien
    Cheers,
    Julien

     
  • Stevan Bajic
    Stevan Bajic
    2009-08-26

    And why do you think that it is redirecting stdout to syslog?

     
  • Julien Valroff
    Julien Valroff
    2009-08-27

    Hi Steve,

    I guess (not tried without) because syslog support is enabled (and is now the default).

    I have obviously tried running the code used in dspam_notifiy.pl, and I get no "Ignoring disallowed preference..." output on stdout, just an entry in syslog (mail facility), eg:
    Aug 26 20:02:03 nix dspam[3919]: Ignoring disallowed preference 'dailyQuarantineSummary'

    Cheers,
    Julien

     
  • Stevan Bajic
    Stevan Bajic
    2009-08-30

    You are right. As soon syslog is enabled the disallowed preferences are printed there and not to stdout. I should probably add two additional options to dspam_admin:
    allowed preference [user]
    disallowed preference [user]

    Kind Regards,

    Stevan Bajic

     
  • Julien Valroff
    Julien Valroff
    2009-08-31

    Hi,

    That would be perfect!

    Cheers,
    Julien