BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
a740e2d6
Commit
a740e2d6
authored
Mar 18, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not allow password reset for ldap user.
parent
8fa53ce4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
passwords_controller.rb
app/controllers/passwords_controller.rb
+18
-0
routes.rb
config/routes.rb
+1
-1
No files found.
app/controllers/passwords_controller.rb
0 → 100644
View file @
a740e2d6
class
PasswordsController
<
Devise
::
PasswordsController
def
create
email
=
resource_params
[
:email
]
resource_found
=
resource_class
.
find_by_email
(
email
)
if
resource_found
&&
resource_found
.
ldap_user?
flash
[
:alert
]
=
"Cannot reset password for LDAP user."
respond_with
({},
:location
=>
after_sending_reset_password_instructions_path_for
(
resource_name
))
and
return
end
self
.
resource
=
resource_class
.
send_reset_password_instructions
(
resource_params
)
if
successfully_sent?
(
resource
)
respond_with
({},
:location
=>
after_sending_reset_password_instructions_path_for
(
resource_name
))
else
respond_with
(
resource
)
end
end
end
config/routes.rb
View file @
a740e2d6
...
@@ -167,7 +167,7 @@ Gitlab::Application.routes.draw do
...
@@ -167,7 +167,7 @@ Gitlab::Application.routes.draw do
resources
:projects
,
constraints:
{
id:
/[^\/]+/
},
only:
[
:new
,
:create
]
resources
:projects
,
constraints:
{
id:
/[^\/]+/
},
only:
[
:new
,
:create
]
devise_for
:users
,
controllers:
{
omniauth_callbacks: :omniauth_callbacks
,
registrations: :registrations
}
devise_for
:users
,
controllers:
{
omniauth_callbacks: :omniauth_callbacks
,
registrations: :registrations
,
passwords: :passwords
}
#
#
# Project Area
# Project Area
...
...
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