1
0
Fork 0
forked from OpenNeo/impress
impress/config
Emi Matchu 7f4c34ff6a Oops, stop requiring a new password whenever AuthUser is changed
Ah right, I went and checked the Devise source code, and the default
implementation for `password_required?` is a bit trickier than I
expected:

```ruby
def password_required?
  !persisted? || !password.nil? || !password_confirmation.nil?
end
```

Looks like `super` does a good enough job here, though! (I'm actually
kinda surprised, I wasn't sure how Ruby's `super` rules worked, and
this isn't a subclass thing—or maybe it is, maybe the `devise` method
adds a mixin? Idk! But it does what I expect, so, great!)

So now, we require the password if 1) Devise doesn't see a UI reason
not to, *and* 2) the user isn't using OmniAuth (i.e. NeoPass).

This had caused a bug where it was impossible to use the Settings page
*without* changing your password! (The form says it's okay to leave it
blank, which stopped being true! But now it's fixed!)
2024-03-14 19:20:33 -07:00
..
environments Oops, stop requiring a new password whenever AuthUser is changed 2024-03-14 19:20:33 -07:00
initializers Refactor to use OpenID Connect OmniAuth gem instead of plain OAuth2 2024-03-14 18:11:40 -07:00
locales Add DTI 2020 link to item pages 2024-03-13 17:46:45 -07:00
application.rb Oops, add ActionCable back to the app 2024-03-13 17:48:25 -07:00
basic_type_hashes.yml vandagyre basic colors (ugh, should be in database) 2014-11-14 19:33:30 -06:00
boot.rb Upgrade to Rails 7.0.6 2023-10-23 19:05:07 -07:00
cable.yml Upgrade to Rails 6.0.6.1 2023-10-23 19:05:06 -07:00
credentials.yml.enc Add hidden "Log in with NeoPass" button, to placeholder login strategy 2024-03-14 15:34:24 -07:00
database.yml Improve Unicode support, emojis don't crash us anymore lol! 2024-02-28 18:54:27 -08:00
environment.rb Upgrade to Rails 6.1.7.4 2023-10-23 19:05:07 -07:00
locale_meta.yml es goes public! 2013-02-16 21:39:04 -06:00
routes.rb Add first draft of /about/neopass page 2024-03-12 17:58:44 -07:00
storage.yml Run rails app:update 2023-10-23 19:05:05 -07:00