Commit 153d3e57 authored by http://jneen.net/'s avatar http://jneen.net/

don't require passwords for internal users

since they can't log in
parent 145f6fd0
......@@ -958,6 +958,14 @@ class User < ActiveRecord::Base
self.admin = (new_level == 'admin')
end
protected
# override, from Devise::Validatable
def password_required?
return false if internal?
super
end
private
def ci_projects_union
......@@ -1058,7 +1066,6 @@ class User < ActiveRecord::Base
scope.create(
username: username,
password: Devise.friendly_token,
email: email,
&creation_block
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment