feat: console help, examples and named loggers (SummerCMS v0.4.0)
Every command gets long help and examples, descriptions in imperative sentence case, and a warn-only TestCommandsDocumented over bonfire.CheckDocs. The plugin logs through a diary component logger instead of the process default logger. Requires SummerCMS v0.4.0; command names and flags unchanged. user:token:create and user:token:list gain --json, user:backfill-handles a progress bar; planning IDs leave the descriptions.
This commit is contained in:
@@ -15,7 +15,14 @@ import (
|
||||
func RequirePasswordChange(withDB func(context.Context, func(*gorm.DB) error) error) bonfire.Command {
|
||||
return bonfire.Command{
|
||||
Name: "user:require-password-change",
|
||||
Description: "Force a user to change their password on next login (D-21)",
|
||||
Description: "Force a user to change their password on next login",
|
||||
Long: `Marks the account with this e-mail so that it must set a new password at its
|
||||
next sign-in; setting the password clears the mark. Use it after a suspected
|
||||
leak or when handing over an account created with a temporary password. It
|
||||
ends with "Password change required for <email>".`,
|
||||
Examples: []bonfire.Example{
|
||||
{Command: "user:require-password-change jane@example.com", Description: "Make Jane set a new password at her next sign-in"},
|
||||
},
|
||||
Args: []bonfire.Arg{{
|
||||
Name: "email",
|
||||
Description: "Account email",
|
||||
|
||||
Reference in New Issue
Block a user