summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/user.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 9c9c1f9c5da..c358b1b8d2b 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -963,14 +963,6 @@ class User < ActiveRecord::Base
self.admin = (new_level == 'admin')
end
- protected
-
- # override, from Devise::Validatable
- def password_required?
- return false if internal?
- super
- end
-
def update_two_factor_requirement
periods = expanded_groups_requiring_two_factor_authentication.pluck(:two_factor_grace_period)
@@ -980,6 +972,14 @@ class User < ActiveRecord::Base
save
end
+ protected
+
+ # override, from Devise::Validatable
+ def password_required?
+ return false if internal?
+ super
+ end
+
private
def ci_projects_union