summaryrefslogtreecommitdiff
path: root/lib/api/users.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-06-27 12:41:51 -0700
committerStan Hu <stanhu@gmail.com>2019-06-27 13:25:37 -0700
commitd6f20b55b8048442c06896fb5e2abed2a2e2574b (patch)
treee76b96c49f1a50c80c83b8d29fa36957200247d0 /lib/api/users.rb
parente29a51360fb3a2b3f96e697110fd9542d6773880 (diff)
downloadgitlab-ce-d6f20b55b8048442c06896fb5e2abed2a2e2574b.tar.gz
Add support for creating random passwords in user creation APIsh-add-force-random-password-user-api
To avoid having to specify an actual password to create users, admins can now use the `force_random_password` parameter to let Devise generate a password. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63826
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r--lib/api/users.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 9ab5fa8d0bd..41418aa216c 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -158,6 +158,7 @@ module API
at_least_one_of :password, :reset_password
requires :name, type: String, desc: 'The name of the user'
requires :username, type: String, desc: 'The username of the user'
+ optional :force_random_password, type: Boolean, desc: 'Flag indicating a random password will be set'
use :optional_attributes
end
post do