summaryrefslogtreecommitdiffstats
path: root/cmd/admin_user.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2023-02-14 22:12:19 +0000
committerGitHub <noreply@github.com>2023-02-14 16:12:19 -0600
commitaa1d95300ab1b34a3b4c9f5902ea821f2aa99f6e (patch)
treeac14d69e9e908ceba7826058115550315ee10c87 /cmd/admin_user.go
parent618c9118c1652fdeea2a2ae0d1459bb1fd3d5169 (diff)
downloadgitea-aa1d95300ab1b34a3b4c9f5902ea821f2aa99f6e.tar.gz
gitea-aa1d95300ab1b34a3b4c9f5902ea821f2aa99f6e.zip
Add command to bulk set must-change-password (#22823)
As part of administration sometimes it is appropriate to forcibly tell users to update their passwords. This PR creates a new command `gitea admin user must-change-password` which will set the `MustChangePassword` flag on the provided users. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'cmd/admin_user.go')
-rw-r--r--cmd/admin_user.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmd/admin_user.go b/cmd/admin_user.go
new file mode 100644
index 0000000000..a442b8fe9c
--- /dev/null
+++ b/cmd/admin_user.go
@@ -0,0 +1,21 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package cmd
+
+import (
+ "github.com/urfave/cli"
+)
+
+var subcmdUser = cli.Command{
+ Name: "user",
+ Usage: "Modify users",
+ Subcommands: []cli.Command{
+ microcmdUserCreate,
+ microcmdUserList,
+ microcmdUserChangePassword,
+ microcmdUserDelete,
+ microcmdUserGenerateAccessToken,
+ microcmdUserMustChangePassword,
+ },
+}