Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-06-27 22:41:51 +0300
committerStan Hu <stanhu@gmail.com>2019-06-27 23:25:37 +0300
commitd6f20b55b8048442c06896fb5e2abed2a2e2574b (patch)
treee76b96c49f1a50c80c83b8d29fa36957200247d0 /lib/api
parente29a51360fb3a2b3f96e697110fd9542d6773880 (diff)
Add support for creating random passwords in user creation 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')
-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