commit
f22488f726
15 changed files with 68 additions and 33 deletions
|
@ -2,11 +2,11 @@ module Gitlab
|
|||
module Entities
|
||||
class User < Grape::Entity
|
||||
expose :id, :username, :email, :name, :bio, :skype, :linkedin, :twitter,
|
||||
:dark_scheme, :theme_id, :blocked, :created_at, :extern_uid, :provider
|
||||
:dark_scheme, :theme_id, :state, :created_at, :extern_uid, :provider
|
||||
end
|
||||
|
||||
class UserBasic < Grape::Entity
|
||||
expose :id, :username, :email, :name, :blocked, :created_at
|
||||
expose :id, :username, :email, :name, :state, :created_at
|
||||
end
|
||||
|
||||
class UserLogin < UserBasic
|
||||
|
|
|
@ -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