[openstreetmap/openstreetmap-website] Simplify GPS trace visibility levels (PR #7146)

Pablo Brasero notifications at github.com
Mon Jun 15 13:46:42 UTC 2026


@pablobm commented on this pull request.

This also needs a migration: the DB schema still has "public" as default value for the visibility column.

>    validates :user, :associated => true
   validates :name, :presence => true, :length => 1..255, :characters => true
   validates :description, :presence => { :on => :create }, :length => 1..255, :characters => true
   validates :timestamp, :presence => true
-  validates :visibility, :inclusion => %w[private public trackable identifiable]
+  validates :visibility, :inclusion => VISIBILITIES + LEGACY_VISIBILITIES

Thoughts on a custom validator here? To check that there's no accidental jump from valid to legacy value.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7146#pullrequestreview-4497832112
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7146/review/4497832112 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260615/51313a7a/attachment.htm>


More information about the rails-dev mailing list