chiark / gitweb /
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 3413791fd6fb5b108faf2ee97c4dd7a14b4dff7a..2d3cb9f28f4bb5fc14d2785c6b222a744383f352 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 d04cb3beab5d7a3c39cb9b056ccce545b58c77ed..1fd94b5bda449993e1e59a7b64d6338497f1e22f 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 8262a036f685be1ab483b01c1005290707192711..bca2b4af5719a53927a236c1f51fd9d3064c7a72 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))