help="Prompt for a password.",action="store_true")
help="Prompt for a password.",action="store_true")
subparser.add_argument("-c","--activate-user",
help="Activate the user after creation.",action="store_true")
subparser.add_argument(
subparser.add_argument(
metavar='USERNAME',
metavar='USERNAME',
dest="user_name",
dest="user_name",
...
@@ -314,6 +321,12 @@ USAGE
...
@@ -314,6 +321,12 @@ USAGE
nargs='?',
nargs='?',
dest="user_email",
dest="user_email",
help="The email address of the new user.")
help="The email address of the new user.")
subparser.add_argument(
metavar='PASSWORD',
nargs="?",
dest="user_password",
default=None,
help="The new user's password. This is overwritten by the -a option.")
subparser=subparsers.add_parser(
subparser=subparsers.add_parser(
"activate_user",help="(Re-)activate an inactive (but existing) user.")
"activate_user",help="(Re-)activate an inactive (but existing) user.")
...
@@ -331,12 +344,18 @@ USAGE
...
@@ -331,12 +344,18 @@ USAGE
subparser=subparsers.add_parser(
subparser=subparsers.add_parser(
"set_user_password",
"set_user_password",
help="Set a new password for a user. The password is not to be given on the command line for security reasons. You will be prompted for the password.")
help="Set a new password for a user. You will be prompted for the password if PASSWORD is not given.")
subparser.set_defaults(call=do_set_user_password)
subparser.set_defaults(call=do_set_user_password)
subparser.add_argument(
subparser.add_argument(
metavar='USERNAME',
metavar='USERNAME',
dest="user_name",
dest="user_name",
help="The name of the user who's password is to be set.")
help="The name of the user who's password is to be set.")