discourse/spec
Ted Johansson 676d5fadab
DEV: Limit and validate category settings inputs (#20135)
We recently had a bug which caused auto-bumping to "not work". The problem was that the value had been set to 0.5, which when coerced to an integer turned into 0. So the feature is "working as intended", but there's a possibility of misconfiguration.

When looking into this, I noticed that the inputs on the category settings page doesn't have any particular sanitisation in the front-end, and also one or two validations missing in the back-end.

This change:

- Takes an existing component, NumberField and enhances that by only allowing numeric input, essentially turning it into a managed input using the same approach as our PasswordField.
- Changes the numeric inputs on category settings page to use this component.
- Adds appropriate min constraints to the fields to disallow out-of-range values.
- Adds missing back-end validations to relevant fields.
2023-02-07 12:27:38 +08:00
..
fabricators DEV: configurable custom sidebar sections (#20057) 2023-02-03 14:44:40 +11:00
fixtures DEV: declare post position as simple number in structured data (#16231) 2023-01-30 08:07:04 +01:00
helpers FEATURE: Show more context in Discourse topic oneboxes 2023-01-11 14:22:53 +01:00
import_export DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
initializers DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
integration SECURITY: Default tags to show count of topics in unrestricted categories (#19916) 2023-01-20 09:50:24 +08:00
integrity FIX: Fix incorrect hashtag setting migration (#19857) 2023-01-16 10:53:00 +10:00
jobs DEV: extract anniversary badge query (#19716) 2023-01-16 11:55:00 +01:00
lib FIX: de-prioritize archived topics (#20161) 2023-02-03 13:23:27 +11:00
mailers DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
models DEV: Limit and validate category settings inputs (#20135) 2023-02-07 12:27:38 +08:00
multisite DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
requests DEV: Fix flakey search spec (#20185) 2023-02-06 14:35:05 -05:00
script/import_scripts DEV: Correct syntax_tree violations 2023-02-02 13:03:11 +00:00
serializers DEV: Improve MessageBus subscriptions for TopicTrackingState (#19767) 2023-02-01 07:18:45 +08:00
services FIX: Category hashtags weren't always found for sub-sub-categories (#20156) 2023-02-03 12:17:52 +01:00
support FIX: domain searches not working properly for URLs (#20136) 2023-02-03 09:55:28 +11:00
system DEV: configurable custom sidebar sections (#20057) 2023-02-03 14:44:40 +11:00
tasks FEATURE: Add rake task to mark old hashtag format for rebake (#19876) 2023-01-18 10:16:05 +10:00
views DEV: use structured data in crawler-linkback-list for referencing only (#16237) 2023-01-30 08:26:55 +01:00
rails_helper.rb DEV: Pass messageId as a dynamic segment instead of a query param (#20013) 2023-02-01 12:39:23 -03:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00