From 90ad6c6efcbcdb2d12ffe9abf232da980b9ea446 Mon Sep 17 00:00:00 2001 Message-Id: <90ad6c6efcbcdb2d12ffe9abf232da980b9ea446.1714088821.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 20 Apr 2008 15:38:22 +0100 Subject: [PATCH] Standardize on "username" (not "user") in user-facing contexts Organization: Straylight/Edgeware From: Richard Kettlewell --- README.client | 2 +- clients/disorder.c | 18 +++++++++--------- disobedience/users.c | 3 --- doc/disorder.1.in | 16 ++++++++-------- doc/disorder_config.5.in | 11 ++++++----- doc/disorder_protocol.5.in | 26 +++++++++++++------------- 6 files changed, 37 insertions(+), 39 deletions(-) diff --git a/README.client b/README.client index cec4e8c..04bdee7 100644 --- a/README.client +++ b/README.client @@ -17,7 +17,7 @@ There is currently no standard DisOrder port number. where PORT is the same as 'listen PORT' on the server. - 3. Copy the password file for each user to ~USER/.disorder/passwd, the + 3. Copy the password file for each user to ~USERNAME/.disorder/passwd, the contents being: password PASSWORD diff --git a/clients/disorder.c b/clients/disorder.c index fa42558..2088bc4 100644 --- a/clients/disorder.c +++ b/clients/disorder.c @@ -475,22 +475,22 @@ static const struct command { int (*isarg)(const char *); const char *argstr, *desc; } commands[] = { - { "adduser", 2, 3, cf_adduser, isarg_rights, "USER PASSWORD [RIGHTS]", + { "adduser", 2, 3, cf_adduser, isarg_rights, "USERNAME PASSWORD [RIGHTS]", "Create a new user" }, { "allfiles", 1, 2, cf_allfiles, isarg_regexp, "DIR [~REGEXP]", "List all files and directories in DIR" }, - { "authorize", 1, 2, cf_authorize, isarg_rights, "USER [RIGHTS]", - "Authorize USER to connect to the server" }, - { "deluser", 1, 1, cf_deluser, 0, "USER", - "Delete a user" }, + { "authorize", 1, 2, cf_authorize, isarg_rights, "USERNAME [RIGHTS]", + "Authorize user USERNAME to connect to the server" }, + { "deluser", 1, 1, cf_deluser, 0, "USERNAME", + "Delete user USERNAME" }, { "dirs", 1, 2, cf_dirs, isarg_regexp, "DIR [~REGEXP]", "List directories in DIR" }, { "disable", 0, 0, cf_disable, 0, "", "Disable play" }, { "disable-random", 0, 0, cf_random_disable, 0, "", "Disable random play" }, - { "edituser", 3, 3, cf_edituser, 0, "USER PROPERTY VALUE", - "Set a property of a user" }, + { "edituser", 3, 3, cf_edituser, 0, "USERNAME PROPERTY VALUE", + "Set a property of user USERNAME" }, { "enable", 0, 0, cf_enable, 0, "", "Enable play" }, { "enable-random", 0, 0, cf_random_enable, 0, "", @@ -566,8 +566,8 @@ static const struct command { "Unset a preference" }, { "unset-global", 1, 1, cf_unset_global, 0, "NAME", "Unset a global preference" }, - { "userinfo", 2, 2, cf_userinfo, 0, "USER PROPERTY", - "Get a property of as user" }, + { "userinfo", 2, 2, cf_userinfo, 0, "USERNAME PROPERTY", + "Get a property of a user" }, { "users", 0, 0, cf_users, 0, "", "List all users" }, { "version", 0, 0, cf_version, 0, "", diff --git a/disobedience/users.c b/disobedience/users.c index ee9c16d..80f3bf2 100644 --- a/disobedience/users.c +++ b/disobedience/users.c @@ -33,9 +33,6 @@ * When you select 'add' a new empty set of details are displayed to be edited. * Again Apply will commit them. * - * TODO: @ref RIGHT_ADMIN and @ref RIGHT_USERINFO should be applied here, so we - * can give decent error messages. - * * TODO: it would be really nice if the Username entry could be removed and new * user names entered in the list, rather off in the details panel. This may * be possible with a sufficiently clever GtkCellRenderer. diff --git a/doc/disorder.1.in b/doc/disorder.1.in index 61f6f02..e1981f6 100644 --- a/doc/disorder.1.in +++ b/doc/disorder.1.in @@ -55,25 +55,25 @@ Display version number. List all known commands. .SH COMMANDS .TP -.B adduser \fIUSER PASSWORD\fR [\fIRIGHTS\fR] +.B adduser \fIUSERNAME PASSWORD\fR [\fIRIGHTS\fR] Create a new user. If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR setting from the server's configuration file applies. .TP -.B authorize \fIUSER\fR [\fIRIGHTS\fR] -Create \fIUSER\fR with a random password. -\fIUSER\fR must be a UNIX login user (not just any old string). +.B authorize \fIUSERNAME\fR [\fIRIGHTS\fR] +Create user \fIUSERNAME\fR with a random password. +User \fIUSERNAME\fR must be a UNIX login user (not just any old string). If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR setting from the server's configuration file applies. .IP -\fI~USER/.disorder/passwd\fR is created with the password in it, so the new +\fI~USERNAME/.disorder/passwd\fR is created with the password in it, so the new user should be able to log in immediately. .IP If writing the \fIpasswd\fR file fails then the user will already have been created in DisOrder's user database. Use \fBdisorder deluser\fR to remove them before trying again. .TP -.B deluser \fIUSER\fR +.B deluser \fIUSERNAME\fR Delete a user. .TP .B dirs \fIDIRECTORY\fR [\fB~\fIREGEXP\fR] @@ -85,7 +85,7 @@ Only directories with a basename matching the regexp will be returned. .B disable Disable playing after the current track finishes. .TP -.B edituser \fIUSER PROPERTY VALUE +.B edituser \fIUSERNAME PROPERTY VALUE Set some property of a user. .TP .B enable @@ -238,7 +238,7 @@ Unset the preference \fIKEY\fR for \fITRACK\fR. .B unset\-global \fIKEY\fR Unset the global preference \fIKEY\fR. .TP -.B userinfo \fIUSER PROPERTY +.B userinfo \fIUSERNAME PROPERTY Get some property of a user. .TP .B users diff --git a/doc/disorder_config.5.in b/doc/disorder_config.5.in index b0f20ae..a9549ed 100644 --- a/doc/disorder_config.5.in +++ b/doc/disorder_config.5.in @@ -214,12 +214,12 @@ Configuration files are read in the following order: Should be readable only by the jukebox group. Not really useful any more and will be abolished in future. .TP -.I ~\fRUSER\fI/.disorder/passwd +.I ~\fRUSERNAME\fI/.disorder/passwd Per-user client configuration. Optional but if it exists must be readable only by the relevant user. Would normally contain a \fBpassword\fR directive. .TP -.I pkgconfdir/config.\fRUSER +.I pkgconfdir/config.\fRUSERNAME Per-user system-controlled client configuration. Optional but if it exists must be readable only by the relevant user. Would normally contain a \fBpassword\fR directive. @@ -691,7 +691,7 @@ Specifies the module used to calculate the length of files matching If \fBtracklength\fR is used without arguments then the list of modules is cleared. .TP -.B user \fIUSER\fR +.B user \fIUSERNAME\fR Specifies the user to run as. Only makes sense if invoked as root (or the target user). .SS "Client Configuration" @@ -768,8 +768,9 @@ longer needs to be specified. This must be the full URL, e.g. \fBhttp://myhost/cgi-bin/jukebox\fR and not \fB/cgi-bin/jukebox\fR. .SS "Authentication Configuration" -These options would normally be used in \fI~\fRUSER\fI/.disorder/passwd\fR or -\fIpkgconfdir/config.\fRUSER. +These options would normally be used in \fI~\fRUSERNAME\fI/.disorder/passwd\fR +or +\fIpkgconfdir/config.\fRUSERNAME. .TP .B password \fIPASSWORD\fR Specify password. diff --git a/doc/disorder_protocol.5.in b/doc/disorder_protocol.5.in index 678c1fd..5a2bf83 100644 --- a/doc/disorder_protocol.5.in +++ b/doc/disorder_protocol.5.in @@ -237,15 +237,15 @@ See below for the track information syntax. Request that DisOrder reconfigure itself. Requires the \fBadmin\fR right. .TP -.B register \fIUSER PASSWORD EMAIL +.B register \fIUSERNAME PASSWORD EMAIL Register a new user. Requires the \fBregister\fR right. The result contains a confirmation string; the user will be be able to log in until this has been presented back to the server via the \fBconfirm\fR command. .TP -.B reminder \fIUSER\fR -Send a password reminder to \fIUSER\fR. +.B reminder \fIUSERNAME\fR +Send a password reminder to user \fIUSERNAME\fR. If the user has no valid email address, or no password, or a reminder has been sent too recently, then no reminder will be sent. .TP @@ -321,13 +321,13 @@ Requires the \fBprefs\fR right. Unset a global preference. Requires the \fBglobal prefs\fR right. .TP -.B user \fIUSER\fR \fIRESPONSE\fR -Authenticate as \fIUSER\fR. +.B user \fIUSERNAME\fR \fIRESPONSE\fR +Authenticate as user \fIUSERNAME\fR. See .B AUTHENTICATION below. .TP -.B userinfo \fIUSER PROPERTY +.B userinfo \fIUSERNAME PROPERTY Get a user property. .TP .B users @@ -494,11 +494,11 @@ Completed playing \fITRACK\fR .B failed \fITRACK\fR \fIERROR\fR Completed playing \fITRACK\fR with an error status .TP -.B moved \fIUSER\fR -User \fIUSER\fR moved some track(s). +.B moved \fIUSERNAME\fR +User \fIUSERNAME\fR moved some track(s). Further details aren't included any more. .TP -.B playing \fITRACK\fR [\fIUSER\fR] +.B playing \fITRACK\fR [\fIUSERNAME\fR] Started playing \fITRACK\fR. .TP .B queue \fIQUEUE-ENTRY\fR... @@ -510,16 +510,16 @@ Added \fIID\fR to the recently played list. .B recent_removed \fIID\fR Removed \fIID\fR from the recently played list. .TP -.B removed \fIID\fR [\fIUSER\fR] +.B removed \fIID\fR [\fIUSERNAME\fR] Queue entry \fIID\fR was removed. -This is used both for explicit removal (when \fIUSER\fR is present) +This is used both for explicit removal (when \fIUSERNAME\fR is present) and when playing a track (when it is absent). .TP .B rescanned A rescan completed. .TP -.B scratched \fITRACK\fR \fIUSER\fR -\fITRACK\fR was scratched by \fIUSER\fR. +.B scratched \fITRACK\fR \fIUSERNAME\fR +\fITRACK\fR was scratched by \fIUSERNAME\fR. .TP .B state \fIKEYWORD\fR Some state change occurred. -- [mdw]