Commit 01be21d4 authored by Alexis Reigel's avatar Alexis Reigel

user#update_two_factor_requirement is public

parent 63e61cfd
...@@ -963,14 +963,6 @@ class User < ActiveRecord::Base ...@@ -963,14 +963,6 @@ class User < ActiveRecord::Base
self.admin = (new_level == 'admin') self.admin = (new_level == 'admin')
end end
protected
# override, from Devise::Validatable
def password_required?
return false if internal?
super
end
def update_two_factor_requirement def update_two_factor_requirement
periods = expanded_groups_requiring_two_factor_authentication.pluck(:two_factor_grace_period) periods = expanded_groups_requiring_two_factor_authentication.pluck(:two_factor_grace_period)
...@@ -980,6 +972,14 @@ class User < ActiveRecord::Base ...@@ -980,6 +972,14 @@ class User < ActiveRecord::Base
save save
end end
protected
# override, from Devise::Validatable
def password_required?
return false if internal?
super
end
private private
def ci_projects_union def ci_projects_union
......
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