impress/app/models
Emi Matchu 58d86cf3ac Prevent user from removing all their login methods
Oh right, if you can remove your email, there's a way to fully lock out
your account:

1. Create account via NeoPass, so no password is set.
2. Ensure you have an email saved, then disconnect NeoPass.
3. Remove the email.
4. Now you have no NeoPass, no email, and no password!

In this change, we add a validation that requires an account to always
have at least one login method. This works well for the case described
above, and also helps offer server-side validation to the "can't
disconnect NeoPass until you have an email and password" stuff that
previously was only enforced by disabling the button.

That is, the following procedure could also lock you out before,
whereas now it raises the "Whoops, there was an error disconnecting
your NeoPass from your account, sorry." message:

1. Create account via NeoPass, so no password is set.
2. Ensure you have an email saved, so "Disconnect" button is enabled.
3. Open a new browser tab, and remove the email.
4. In the original browser tab, click "Disconnect".
2024-04-09 06:40:56 -07:00
..
fundraising Move fundraising models into the Fundraising module 2024-02-18 20:29:31 -08:00
item Use fits:nostalgic-faerie-draik filter format when we can 2024-02-27 15:51:27 -08:00
alt_style.rb Filter search in wardrobe-2020 by alt styles! 2024-02-27 16:11:06 -08:00
application_record.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
auth_record.rb Add AuthUser model, connecting to openneo_id db 2023-10-23 19:05:07 -07:00
auth_user.rb Prevent user from removing all their login methods 2024-04-09 06:40:56 -07:00
closet_hanger.rb Fix MissingAttributeError in ClosetHanger#merge_quantities 2024-02-28 13:30:55 -08:00
closet_list.rb Migrate away from item translations in the Your Items feature 2024-02-20 15:36:20 -08:00
closet_visibility.rb Delete a couple unused accessors 2023-11-11 15:42:08 -08:00
color.rb Fully disable model translations for Color/Species/Zone 2024-02-03 08:13:14 -08:00
contribution.rb Track contributions of Alt Styles 2024-01-24 03:54:43 -08:00
item.rb Filter search in wardrobe-2020 by alt styles! 2024-02-27 16:11:06 -08:00
item_outfit_relationship.rb Oops, update outfit's updated_at when adding/removing items 2024-02-08 10:32:53 -08:00
neopets_connection.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
neopets_page.rb Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
outfit.rb Refactor Impress 2020 config 2024-02-22 13:07:43 -08:00
parent_swf_asset_relationship.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
pet.rb Refactor image hash loading to use PetService.getPet, not CPN redirs 2024-04-06 02:56:40 -07:00
pet_state.rb Remove logic to auto-detect Unconverted pets (fixes Baby Pteri bug) 2024-02-01 01:40:50 -08:00
pet_type.rb Refactor pet image hash loading into the Pet model, not PetType 2024-04-06 02:25:22 -07:00
species.rb Fully disable model translations for Color/Species/Zone 2024-02-03 08:13:14 -08:00
swf_asset.rb Oops, choose the *first* PNG from the manifest, to avoid reference art 2024-03-07 14:16:05 -08:00
user.rb Rename AuthUser#neopass? -> AuthUser#uses_neopass? 2024-04-07 08:12:38 -07:00
zone.rb Add useItemSearch for wardrobe app, but don't use it yet! 2024-02-25 12:06:32 -08:00