Ishmeet Singh
6524541975
Test validation of title and description presence for redactions
2024-03-11 09:27:30 +00:00
Tom Hughes
29cc21c599
Drop user tokens table
2024-02-28 21:02:54 +00:00
Tom Hughes
3360f91733
Require display names to have a minimum unicode width of 3 columns
...
Fixes #4538
2024-02-25 13:21:03 +00:00
Andy Allan
a1a6c577e8
Merge pull request #4534 from tomhughes/list-headers
...
Add standard List-XXX headers to some notification mails
2024-02-25 11:36:05 +01:00
Tom Hughes
741ed58838
Add a limit on the number of points in a GPS trace
2024-02-25 09:50:02 +00:00
Tom Hughes
8e21e4e801
Move mechanics of changeset subscriptions into the model
2024-02-25 09:48:11 +00:00
Tom Hughes
b9c5df4dad
Use with_settings for temporary changes to settings
2024-02-01 18:37:28 +00:00
Andy Allan
7406ae5dcc
Merge pull request #4218 from AntonKhorev/no-user-id-renames
...
Disallow username changes to user_n if n isn't their id
2024-01-18 10:47:17 +00:00
Andy Allan
0a21080192
Move change detection to validation declaration
...
This aligns with other validations. Also add test to ensure unchanged
display_names are treated as valid.
2024-01-18 10:33:56 +00:00
Anton Khorev
2c342adc0d
Disallow username changes to user_n if n isn't their id
2024-01-18 10:33:56 +00:00
Andy Allan
d5efa4c357
Merge pull request #4405 from tomhughes/normalize-display-name
...
Require user names to be unique after unicode normalisation
2024-01-17 16:24:09 +00:00
Anton Khorev
6272b041c6
Add :closed trait to note factory
2024-01-05 12:34:27 +03:00
Anton Khorev
3a8a997fb8
Use assert_not_predicate in tests that have assert_predicate
2024-01-03 16:01:17 +03:00
Anton Khorev
6427f68ea7
Don't show native language name if it's the same as English name
2024-01-02 09:09:33 +03:00
Gregory Igelmund
d0ec5d1437
Add tests & factories for UserMute feature
2023-12-19 12:57:47 -05:00
Tom Hughes
d8e5b84e5b
Add test for no_trace_download ACLs
2023-12-19 12:03:08 +00:00
Tom Hughes
f28bad7229
Add test for no_note_comment ACLs
2023-12-19 12:03:08 +00:00
Tom Hughes
9a6a6fab73
Make allow_account_creation work the same as other ACLs
2023-12-19 12:03:08 +00:00
Milan Cvetkovic
a4c23cd89f
Implement allow list for account creation
2023-12-17 07:55:43 +00:00
Tom Hughes
c12f8959dd
Require user names to be unique after unicode normalisation
...
As with the previous checks on case sensitivity this only affects
new users, and changes to names of existing users.
2023-12-13 22:27:36 +00:00
Anton Khorev
a8aaf62e62
Add earliest allowed deletion time to user model
2023-11-22 17:02:48 +03:00
Andy Allan
1700c23dd1
Prefer find_by() instead of where().first
...
These are very similar, differing only if we would expect multiple
results and the sorting is important. However, in all our cases
we're only expecting one result to be returned, and so find_by is
easier to read.
2023-10-04 17:53:58 +01:00
Andy Allan
b595b87c48
Use trace instead of gpx_id in queries
...
This makes the queries easier to read.
2023-08-30 17:08:46 +01:00
Tom Hughes
6982903ae7
Fix predicate method names in the user model
2023-08-15 18:53:14 +01:00
Tom Hughes
e5406c6836
Make test names clearer
2022-12-29 16:52:19 +00:00
Andy Allan
0925035a3e
Add tests to ensure tokens are revoked
...
This ensures that tokens are revoked or invalidated when a user
is soft destroyed.
2022-12-28 15:25:57 +00:00
Andy Allan
415ac577f3
Remove some old debugging comments
2022-12-21 12:05:15 +00:00
Tom Hughes
9cd96bd452
Fix new rubocop warnings
2022-09-09 22:45:58 +01:00
Anton Khorev
b54c03389b
Strip leading/trailing whitespace from comma-separated trace tags
2022-07-19 13:47:28 +03:00
Tom Hughes
a3a228862c
Add validation for relation member roles
...
Fixes #3563
2022-06-09 19:21:08 +01:00
Harry Wood
3ca8b63643
Put issue comments through kramdown formatter
...
On issue comments (which only admins can create or see), put the `body` text through kramdown formatting.
2022-05-06 13:36:59 +01:00
Harry Wood
e204e1d178
Add some basic testing of issue_comment model
...
A factory and a basic test of validation for the issue_comment model, similar to what we have for diary_comment.
2022-05-06 12:38:17 +01:00
Harry Wood
9401e451d1
Format report text with kramdown
...
Pass the text of reports ('details' field) through the RichText formatter to give us kramdown formatting support.
2022-04-29 01:31:39 +01:00
Andy Allan
5c2cb9e96f
Use factories for tag uniqueness tests
2022-03-30 17:15:11 +01:00
Andy Allan
034db6820f
Simplify changeset tag tests by using factories
...
This saves lots of boilerplate in creating a valid test object
2022-03-30 17:03:04 +01:00
Andy Allan
374518f58a
Rework 'empty' tag tests
...
These tests were checking that the parent object was set, but this
was not obvious from the way that the tests were named and constructed.
This refactoring makes it clearer what is being checked.
2022-03-30 16:37:16 +01:00
Tom Hughes
03cad948e3
Fix new rubocop warnings
2022-03-15 19:24:09 +00:00
Andy Allan
d6f8302eae
Merge pull request #3491 from tomhughes/legacy-trace
...
Remove support for legacy trace files
2022-03-09 17:10:40 +00:00
Tom Hughes
cbcc7dc49f
Fix some rubocop Naming/PredicateName warnings
2022-03-03 22:47:55 +00:00
Tom Hughes
92b122759f
Remove support for legacy trace files
2022-03-03 19:47:40 +00:00
Tom Hughes
b5f06e06c1
Fix rubocop Rails/TimeZone warnings
2022-03-01 22:55:10 +00:00
Andy Allan
2fabc46421
Merge pull request #3440 from mmd-osm/relationmemberlimit
...
Introduce relation member limit
2022-02-16 14:58:30 +00:00
Tom Hughes
53aa7259bb
Merge remote-tracking branch 'upstream/pull/3345'
2022-02-13 18:39:21 +00:00
mmd-osm
2efd73c672
Introduce relation member limit
...
Adds a new parameter `max_number_of_relation_members` in settings.yml
2022-02-02 13:15:40 +01:00
Andy Allan
1a11c4dc19
Use a state machine for user status
...
The user status is a bit complex, since there are various states and
not all transitions between them make sense.
Using AASM means that we can name and restrict the transitions, which
hopefully makes them easier to reason about.
2022-01-12 18:16:14 +00:00
Andy Allan
0100cfe304
Use factory_bot to build new model objects
2022-01-06 10:46:38 +00:00
Andy Allan
88cf03ff00
Use factorybot to build user objects
...
This allows us to only specify attributes of interest in the test.
2022-01-05 20:29:12 +00:00
Andy Allan
a863be8831
Rename User#delete to User#destroy
...
"delete" is generally used for immediate SQL deletion without running
any callbacks or other ruby code, whereas "destroy" will trigger callbacks.
Although we don't currently use any callbacks, let's rename this method to
align better with the convention.
2021-12-22 11:32:33 +00:00
Tom Hughes
0410596908
Switch traces to use ActiveStorage
2021-12-16 18:45:31 +00:00
Andy Allan
9ab15f38ea
Move the tracepoint coordinate format test to the controller test
...
This allows us to remove the model method
2021-09-29 15:25:28 +01:00