User's blocked field refactored to use state machine
This commit is contained in:
parent
9a06dd4aa1
commit
0d9a6fe7b1
12 changed files with 40 additions and 33 deletions
|
@ -41,10 +41,12 @@ module Gitlab
|
|||
password_confirmation: password,
|
||||
projects_limit: Gitlab.config.gitlab.default_projects_limit,
|
||||
}, as: :admin)
|
||||
if Gitlab.config.omniauth['block_auto_created_users'] && !ldap
|
||||
@user.blocked = true
|
||||
end
|
||||
@user.save!
|
||||
|
||||
if Gitlab.config.omniauth['block_auto_created_users'] && !ldap
|
||||
@user.block
|
||||
end
|
||||
|
||||
@user
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue