]> git.openstreetmap.org Git - rails.git/commit
Make traces feature optional via traces_disabled setting
authorLee Kindness <lee@leekindness.com>
Fri, 26 Jun 2026 20:24:54 +0000 (21:24 +0100)
committerLee Kindness <lee@leekindness.com>
Mon, 29 Jun 2026 20:08:25 +0000 (21:08 +0100)
commitb58229aa6a18e3f452c13591dfe9ed06f029be91
tree941ccd0a704f8ef121aaa7c0261e1d850ffc1988
parent8043fa527ae98317a6e3cdc91cdac8796856525c
Make traces feature optional via traces_disabled setting

Adds an optional traces_disabled setting to allow alternative deployments to disable the traces/tracks feature entirely. When absent (the default) traces are enabled; set to true to disable.

When disabled, all trace routes are removed via a routing constraint so requests return 404. Navigation links to traces in the header and user profile are conditionally hidden. CanCan abilities for Trace respect the setting.
14 files changed:
app/abilities/ability.rb
app/helpers/application_helper.rb
app/views/users/show.html.erb
config/routes.rb
config/settings.yml
test/controllers/api/tracepoints_controller_test.rb
test/controllers/api/traces/data_controller_test.rb
test/controllers/api/traces_controller_test.rb
test/controllers/api/users/traces_controller_test.rb
test/controllers/traces/data_controller_test.rb
test/controllers/traces/feeds_controller_test.rb
test/controllers/traces/icons_controller_test.rb
test/controllers/traces/pictures_controller_test.rb
test/controllers/traces_controller_test.rb