mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-19 22:16:15 -06:00
[feature] Add enable command to mirror existing disable command; update docs (#2792)
* [feature] add `enable` CLI command to mirror existing `disable` command * update docs
This commit is contained in:
parent
be259b13a7
commit
29972e2c93
4 changed files with 145 additions and 25 deletions
|
|
@ -108,7 +108,7 @@ func adminCommands() *cobra.Command {
|
|||
|
||||
adminAccountDisableCmd := &cobra.Command{
|
||||
Use: "disable",
|
||||
Short: "prevent a local account from signing in or posting etc, but don't delete anything",
|
||||
Short: "set 'disabled' to true on a local account to prevent it from signing in or posting etc, but don't delete anything",
|
||||
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
return preRun(preRunArgs{cmd: cmd})
|
||||
},
|
||||
|
|
@ -119,6 +119,19 @@ func adminCommands() *cobra.Command {
|
|||
config.AddAdminAccount(adminAccountDisableCmd)
|
||||
adminAccountCmd.AddCommand(adminAccountDisableCmd)
|
||||
|
||||
adminAccountEnableCmd := &cobra.Command{
|
||||
Use: "enable",
|
||||
Short: "undo a previous disable command by setting 'disabled' to false on a local account",
|
||||
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
return preRun(preRunArgs{cmd: cmd})
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return run(cmd.Context(), account.Enable)
|
||||
},
|
||||
}
|
||||
config.AddAdminAccount(adminAccountEnableCmd)
|
||||
adminAccountCmd.AddCommand(adminAccountEnableCmd)
|
||||
|
||||
adminAccountPasswordCmd := &cobra.Command{
|
||||
Use: "password",
|
||||
Short: "set a new password for the given local account",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue