discourse/spec/requests
Andrei Prigorshnev d91456fd53
DEV: Ability to collect stats without exposing them via API (#23933)
This adds the ability to collect stats without exposing them 
among other stats via API.

The most important thing I wanted to achieve is to provide 
an API where stats are not exposed by default, and a developer 
has to explicitly specify that they should be 
exposed (`expose_via_api: true`). Implementing an opposite 
solution would be simpler, but that's less safe in terms of 
potential security issues. 

When working on this, I had to refactor the current solution. 
I would go even further with the refactoring, but the next steps 
seem to be going too far in changing the solution we have, 
and that would also take more time. Two things that can be 
improved in the future:
1. Data structures for holding stats can be further improved
2. Core stats are hard-coded in the About template (it's hard 
to fix it without correcting data structures first, see point 1):
    63a0700d45/app/views/about/index.html.erb (L61-L101)

The most significant refactorings are:
1. Introducing the `Stat` model
2. Aligning the way the core and the plugin stats' are registered
2023-11-10 00:44:05 +04:00
..
admin FEATURE: Theme settings migrations (#24071) 2023-11-02 08:10:15 +03:00
api DEV: Deprecate defunct User#flag_level column (#24134) 2023-10-27 17:27:04 +08:00
examples SECURITY: Impose a upper bound on limit params in various controllers 2023-07-28 12:53:46 +01:00
about_controller_spec.rb
application_controller_spec.rb DEV: Change anonymous_posting_min_trust_level to a group-based setting (#24072) 2023-10-25 11:45:10 +10:00
associate_accounts_controller_spec.rb
badges_controller_spec.rb
bookmarks_controller_spec.rb DEV: Remove Discourse.redis.delete_prefixed (#22103) 2023-06-16 12:44:35 +10:00
bootstrap_controller_spec.rb DEV: Eliminate flakiness in specs that depend on plugins from fixtures (#21912) 2023-06-05 08:06:00 +08:00
categories_controller_spec.rb DEV: Remove spec calling add_to_serializer (#24116) 2023-10-26 20:17:21 +01:00
clicks_controller_spec.rb
composer_controller_spec.rb UX: hide warning if all users mentioned via group are already invited. (#23557) 2023-09-13 19:21:44 +05:30
composer_messages_controller_spec.rb
csp_reports_controller_spec.rb
directory_columns_controller_spec.rb DEV: Refactored and moved Edit Directory Column tests out of directory_columns_controller_spec (#22022) 2023-06-08 18:00:01 -05:00
directory_items_controller_spec.rb FIX: Validate page/limit params for directory, user-badges and groups (#22877) 2023-07-31 15:00:05 +01:00
do_not_disturb_controller_spec.rb
drafts_controller_spec.rb SECURITY: Limit number of drafts per user and length of `draft_key` 2023-09-12 15:31:26 -03:00
edit_directory_columns_controller_spec.rb DEV: Refactored and moved Edit Directory Column tests out of directory_columns_controller_spec (#22022) 2023-06-08 18:00:01 -05:00
email_controller_spec.rb FIX: Unsubscribing via key associated with deleted topic (#20275) 2023-02-16 10:47:01 +00:00
embed_controller_spec.rb FEATURE: Serve RTL versions of admin and plugins CSS bundles for RTL locales (#21876) 2023-06-01 05:27:11 +03:00
exceptions_controller_spec.rb
export_csv_controller_spec.rb
extra_locales_controller_spec.rb
finish_installation_controller_spec.rb
form_templates_controller_spec.rb DEV: Remove setting explicit `id` on Fabricated property (#21831) 2023-05-30 09:34:01 -07:00
forums_controller_spec.rb
groups_controller_spec.rb FEATURE: Add custom fields to members on group index (#24232) 2023-11-07 10:06:47 -04:00
hashtags_controller_spec.rb DEV: Remove enable_experimental_hashtag_autocomplete logic (#22820) 2023-08-08 11:18:55 +10:00
inline_onebox_controller_spec.rb
invites_controller_spec.rb SECURITY: Handle concurrent invite accepts 2023-07-28 12:53:48 +01:00
list_controller_spec.rb DEV: Serialize categories in topic lists (#23597) 2023-10-17 19:06:01 +03:00
metadata_controller_spec.rb
notifications_controller_spec.rb FEATURE: Remove support for legacy navigation menu (#23752) 2023-10-09 07:24:10 +08:00
offline_controller_spec.rb
omniauth_callbacks_controller_spec.rb DEV: Only run omniauth strategies for enabled authenticators (#24094) 2023-10-25 13:52:33 +01:00
onebox_controller_spec.rb
permalinks_controller_spec.rb
post_action_users_controller_spec.rb SECURITY: Impose a upper bound on limit params in various controllers 2023-07-28 12:53:46 +01:00
post_actions_controller_spec.rb
post_readers_controller_spec.rb
posts_controller_spec.rb SECURITY: Prevent arbitrary topic custom fields from being set 2023-10-16 10:34:35 -04:00
presence_controller_spec.rb
published_pages_controller_spec.rb
push_notification_controller_spec.rb
qunit_controller_spec.rb DEV: Stop building test assets in production under Embroider (#23388) 2023-09-11 09:12:37 +01:00
reviewable_claimed_topics_controller_spec.rb
reviewables_controller_spec.rb FIX: Pending post deletion by creator (#23130) 2023-08-18 15:30:59 +00:00
robots_txt_controller_spec.rb
safe_mode_controller_spec.rb
search_controller_spec.rb FIX: Search by tag context was broken (#23006) 2023-08-08 15:15:34 -04:00
session_controller_spec.rb DEV: Add routes and controller actions for passkeys (2/3) (#23587) 2023-10-11 14:36:54 -04:00
sidebar_sections_controller_spec.rb FIX: reliably reorder link in custom sections (#24188) 2023-11-02 08:46:45 +11:00
similar_topics_controller_spec.rb DEV: Disable SearchIndexer after fabrication (#21378) 2023-05-04 09:20:52 +08:00
site_controller_spec.rb DEV: Ability to collect stats without exposing them via API (#23933) 2023-11-10 00:44:05 +04:00
sitemap_controller_spec.rb
slugs_controller_spec.rb DEV: Remove Discourse.redis.delete_prefixed (#22103) 2023-06-16 12:44:35 +10:00
static_controller_spec.rb DEV: Remove legacy `/brotli_asset` workaround (#24243) 2023-11-06 15:57:00 +00:00
steps_controller_spec.rb
stylesheets_controller_spec.rb DEV: Eliminate flakiness in specs that depend on plugins from fixtures (#21912) 2023-06-05 08:06:00 +08:00
svg_sprite_controller_spec.rb DEV: Avoid multiple fabrications in spec (#21606) 2023-05-17 14:28:31 +08:00
tag_groups_controller_spec.rb SECURITY: Impose a upper bound on limit params in various controllers 2023-07-28 12:53:46 +01:00
tags_controller_spec.rb SECURITY: Impose a upper bound on limit params in various controllers 2023-07-28 12:53:46 +01:00
theme_javascripts_controller_spec.rb
topics_controller_spec.rb FIX: Remove invalid chars from feed XMLs (#24001) 2023-10-19 14:37:37 -03:00
uploads_controller_multisite_spec.rb
uploads_controller_spec.rb DEV: Introduce S3 transfer acceleration for uploads behind hidden setting (#24238) 2023-11-07 11:50:40 +10:00
user_actions_controller_spec.rb
user_api_keys_controller_spec.rb
user_avatars_controller_spec.rb FEATURE: reduce avatar sizes to 6 from 20 (#21319) 2023-06-01 10:00:01 +10:00
user_badges_controller_spec.rb FIX: Validate page/limit params for directory, user-badges and groups (#22877) 2023-07-31 15:00:05 +01:00
user_status_controller_spec.rb DEV: Format `UserStatus#ends_at` as a ISO8601 timestamp (#23796) 2023-10-05 20:41:12 +02:00
users_controller_spec.rb SECURITY: Filter unread bookmark reminders the user cannot see 2023-11-09 13:39:16 +11:00
users_email_controller_spec.rb DEV: Remove Discourse.redis.delete_prefixed (#22103) 2023-06-16 12:44:35 +10:00
webhooks_controller_spec.rb FEATURE: Add Mailpace webhook (#21981) 2023-06-08 20:06:20 +03:00
wizard_controller_spec.rb