[openstreetmap/openstreetmap-website] Hide the anonymous note creation form when the limit is exceeded (PR #6593)
Pablo Brasero
notifications at github.com
Wed Dec 10 11:10:49 UTC 2025
@pablobm approved this pull request.
I say let's try this 🤞 Thank you @deevroman!
> @@ -34,4 +34,12 @@ def note_author(author, link_options = {})
:class => "mw-100 d-inline-block align-bottom text-truncate text-wrap", :dir => "auto"
end
end
+
+ def soft_anonymous_notes_limit_reached?(anonymous_notes_count)
+ !current_user && anonymous_notes_count >= 5
+ end
+
+ def hard_anonymous_notes_limit_reached?(anonymous_notes_count)
+ !current_user && anonymous_notes_count >= 10
+ end
I think you are correct here, making these into pure functions instead of expecting `@anonymous_notes_count` to exist 👍 (which was what I initially suggested).
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6593#pullrequestreview-3562007547
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6593/review/3562007547 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251210/d722d583/attachment.htm>
More information about the rails-dev
mailing list