discourse/spec
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
..
fabricators DEV: Move shared_drafts_min_trust_level to group setting (#24257) 2023-11-07 14:03:25 +10:00
fixtures SECURITY: Onebox templates' HTML injections. 2023-11-09 13:39:11 +11:00
helpers DEV: Remove legacy `/brotli_asset` workaround (#24243) 2023-11-06 15:57:00 +00:00
import_export
initializers
integration DEV: Prevent videos from preloading metadata (#23807) 2023-10-12 13:47:48 -06:00
integrity
jobs DEV: Allow new_features URL to be configurable (#24306) 2023-11-09 13:50:21 +10:00
lib DEV: Ability to collect stats without exposing them via API (#23933) 2023-11-10 00:44:05 +04:00
mailers
migrations
models DEV: Ability to collect stats without exposing them via API (#23933) 2023-11-10 00:44:05 +04:00
multisite
requests DEV: Ability to collect stats without exposing them via API (#23933) 2023-11-10 00:44:05 +04:00
script/import_scripts
serializers DEV: Ability to collect stats without exposing them via API (#23933) 2023-11-10 00:44:05 +04:00
services SECURITY: Filter unread bookmark reminders the user cannot see 2023-11-09 13:39:16 +11:00
support FEATURE: Theme settings migrations (#24071) 2023-11-02 08:10:15 +03:00
system FEATURE: Add theme-components route for admin (#24264) 2023-11-08 13:42:27 +10:00
tasks DEV: Remove the transpilation message (#23998) 2023-10-19 01:00:15 +02:00
views
rails_helper.rb DEV: Allow Capybara's server port to be configurable (#23606) 2023-09-15 11:46:03 +08:00
regenerate_swagger_docs
swagger_helper.rb