discourse/spec/services
Alan Guo Xiang Tan e97ef7e9af
FEATURE: Allow site admin to mark a user's password as expired (#27314)
This commit adds the ability for site administrators to mark users'
passwords as expired. Note that this commit does not add any client side
interface to mark a user's password as expired.

The following changes are introduced in this commit:

1. Adds a `user_passwords` table and `UserPassword` model. While the
   `user_passwords` table is currently used to only store expired
   passwords, it will be used in the future to store a user's current
   password as well.

2. Adds a `UserPasswordExpirer.expire_user_password` method which can
   be used from the Rails console to mark a user's password as expired.

3. Updates `SessionsController#create` to check that the user's current
   password has not been marked as expired after confirming the
   password. If the password is determined to be expired based on the
   existence of a `UserPassword` record with the `password_expired_at`
   column set, we will not log the user in and will display a password
   expired notice. A forgot password email is automatically send out to
   the user as well.
2024-06-04 15:42:53 +08:00
..
notifications FEATURE: Consolidate link notifications (#26567) 2024-04-09 11:53:37 -06:00
problem_check DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
anonymous_shadow_creator_spec.rb DEV: Automatically update groups for test users with explicit TL (#25415) 2024-01-29 17:52:02 +08:00
auto_silence_spec.rb DEV: move post flags into database (#27125) 2024-05-23 12:19:07 +10:00
badge_granter_spec.rb DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
base_bookmarkable_spec.rb FIX: Show deleted bookmark reminders in user bookmarks menu (#25905) 2024-02-29 09:03:49 +10:00
category_hashtag_data_source_spec.rb FEATURE: Async load of category and chat hashtags (#25526) 2024-02-12 12:07:14 +02:00
color_scheme_revisor_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
destroy_task_spec.rb DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
email_settings_exception_handler_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
email_settings_validator_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
email_style_updater_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
external_upload_manager_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
flag_sockpuppets_spec.rb DEV: Fix Lint/BooleanSymbol (#24747) 2023-12-06 13:19:09 +01:00
group_action_logger_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
group_mentions_updater_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
group_message_spec.rb FIX: crawler view with unicode usernames (#27051) 2024-05-16 17:11:24 +02:00
hashtag_autocomplete_service_spec.rb FEATURE: Async load of category and chat hashtags (#25526) 2024-02-12 12:07:14 +02:00
heat_settings_updater_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
inline_uploads_multisite_spec.rb DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
inline_uploads_spec.rb DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
notification_emailer_spec.rb FIX: Avoid sending user emails if @ mentioning a staged user in a topic (#26102) 2024-03-13 11:05:34 +08:00
post_action_notifier_spec.rb DEV: Convert min_trust_to_create_topic to groups (#24740) 2023-12-13 14:50:13 +11:00
post_alerter_spec.rb FIX: Avoid sending user emails if @ mentioning a staged user in a topic (#26102) 2024-03-13 11:05:34 +08:00
post_bookmarkable_spec.rb DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
post_owner_changer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
problem_check_spec.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
push_notification_pusher_spec.rb DEV: Add modifiers for plugins to customize push notification translation arguments (#25889) 2024-02-27 14:03:55 -06:00
random_topic_selector_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
search_indexer_spec.rb DEV: Remove lazy-yt and replace with lazy-videos (#20722) 2023-03-29 11:54:25 -04:00
sidebar_site_settings_backfiller_spec.rb DEV: Fix various spec linting issues (#24672) 2023-12-04 13:45:19 +01:00
site_settings_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
staff_action_logger_spec.rb SECURITY: Prevent large staff actions causing DoS 2024-03-15 14:24:04 +08:00
tag_hashtag_data_source_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
theme_settings_migrations_runner_spec.rb FIX: Make `getCategoryIdByName` theme migration helper case insensitive (#26878) 2024-05-06 12:42:58 +08:00
themes_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
toggle_flag_spec.rb FEATURE: admin can disable flags (#27171) 2024-05-29 14:39:58 +10:00
topic_bookmarkable_spec.rb DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
topic_status_updater_spec.rb FIX: Better tracking of topic visibility changes (#26709) 2024-04-29 10:34:46 +10:00
topic_summarization_spec.rb FEATURE: Prefer topic_embed's cached content when summarizing (#25190) 2024-01-09 14:00:01 -03:00
topic_timestamp_changer_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
trust_level_granter_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
user_activator_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
user_anonymizer_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
user_authenticator_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
user_destroyer_spec.rb DEV: Make all admins TL4 in tests (#25435) 2024-03-26 11:41:12 +08:00
user_merger_spec.rb FEATURE: Merge user associated accounts, favouring the target user upon conflict (#26645) 2024-04-16 17:37:33 +08:00
user_notification_schedule_processor_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
user_password_expirer_spec.rb FEATURE: Allow site admin to mark a user's password as expired (#27314) 2024-06-04 15:42:53 +08:00
user_silencer_spec.rb DEV: update syntax tree to latest (#24623) 2023-11-29 16:38:07 +11:00
user_stat_count_updater_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
user_updater_spec.rb UX: Improvements to user tips (#26480) 2024-04-03 11:43:56 -04:00
username_changer_spec.rb DEV: Update username in new quote format - Part 1 (#22032) 2023-06-14 16:14:11 +08:00
username_checker_service_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
wildcard_domain_checker_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
wildcard_url_checker_spec.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
word_watcher_spec.rb DEV: Refactor watched words (#24163) 2023-11-01 16:41:10 +02:00