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

Ruben L. Mendoza notifications at github.com
Fri Jun 26 22:30:46 UTC 2026


@Rub21 commented on this pull request.



>    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

I added one. There's now a visibility_not_changed_to_legacy validator that runs on update. It only blocks a trace that moves from a valid value (trackable/identifiable) back to a legacy one (public/private):




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

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


More information about the rails-dev mailing list