disorder setup-guest enforces mail_sender requirement
authorrjk@greenend.org.uk <>
Sat, 29 Dec 2007 19:08:01 +0000 (19:08 +0000)
committerrjk@greenend.org.uk <>
Sat, 29 Dec 2007 19:08:01 +0000 (19:08 +0000)
clients/disorder.c
doc/disorder.1.in
tests/dtest.py

index 3413791..2d3cb9f 100644 (file)
@@ -467,6 +467,8 @@ static void cf_setup_guest(char **argv) {
     default: fatal(0, "invalid option");
     }
   }
+  if(online_registration && !config->mail_sender)
+    fatal(0, "you MUST set mail_sender if you want online registration");
   if(disorder_adduser(getclient(), "guest", "",
                      online_registration ? "read,register" : "read"))
     exit(EXIT_FAILURE);
index d04cb3b..1fd94b5 100644 (file)
@@ -204,6 +204,9 @@ allowing new users to automatically register themselves via the web interface.
 .IP
 With the option \fB--no-online-registration\fR, the "register" right is
 suppressed and users must be manually created by an administrator.
+.IP
+If online registration is desired then \fBmail_sender\fR must be set in the
+configuration file.  See \fBdisorder_config\fR(5).
 .TP
 .B shutdown
 Shut down the daemon.
index 8262a03..bca2b4a 100644 (file)
@@ -194,6 +194,7 @@ tracklength *.flac disorder-tracklength
 speaker_backend network
 broadcast 127.0.0.1 %d
 broadcast_from 127.0.0.1 %d
+mail_sender no.such.user.sorry@greenend.org.uk
 """ % (testroot, testroot, testroot, top_builddir, top_builddir,
        port, port + 1))