Commit 09e2c1af authored by Sean McGivern's avatar Sean McGivern

Merge branch 'sh-fix-almost-there-spec-mysql' into 'master'

Fix sub-second timing comparison error for Devise confirmation period

Closes gitlab-ee#2362

See merge request !11156
parents e6b2baf2 c175c30d
......@@ -1000,6 +1000,15 @@ class User < ActiveRecord::Base
devise_mailer.send(notification, self, *args).deliver_later
# This works around a bug in Devise 4.2.0 that erroneously causes a user to
# be considered active in MySQL specs due to a sub-second comparison
# issue. For more details, see:
def confirmation_period_valid?
return false if self.class.allow_unconfirmed_access_for == 0.days
def ensure_external_user_rights
return unless external?
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment