Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
7aa54e4d4e10
Commit
2e8b0fa5
authored
Oct 15, 2013
by
Dmitriy Zaporozhets
Browse files
Oauth users and users created by admin should be confirmed immediatly
parent
0f460f3a1d60
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/controllers/admin/users_controller.rb
View file @
7aa54e4d
...
...
@@ -47,6 +47,7 @@ def create
@user
=
User
.
build_user
(
params
[
:user
].
merge
(
opts
),
as: :admin
)
@user
.
admin
=
(
admin
&&
admin
.
to_i
>
0
)
@user
.
created_by_id
=
current_user
.
id
@user
.
confirm!
respond_to
do
|
format
|
if
@user
.
save
...
...
lib/gitlab/oauth/user.rb
View file @
7aa54e4d
...
...
@@ -29,6 +29,7 @@ def create(auth)
user
=
model
.
build_user
(
opts
,
as: :admin
)
user
.
save!
user
.
confirm!
log
.
info
"(OAuth) Creating user
#{
email
}
from login with extern_uid =>
#{
uid
}
"
if
Gitlab
.
config
.
omniauth
[
'block_auto_created_users'
]
&&
!
ldap?
...
...
spec/factories.rb
View file @
7aa54e4d
...
...
@@ -23,6 +23,10 @@
end
factory
:admin
,
traits:
[
:admin
]
after
:create
do
|
u
|
u
.
confirm!
end
end
factory
:project
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment