Commit graph

137 commits

Author SHA1 Message Date
Karina Kwiatek
41e476a2f7 Prevent other user's anon blocks from affecting each other 2022-06-15 14:26:48 +02:00
Karina Kwiatek
abd07373e3 Fix double-hashing in Ajax::AnonymousBlockController#create 2022-06-15 14:26:48 +02:00
Karina Kwiatek
e660b731d7 Appease the dog overlords 2022-06-15 14:26:48 +02:00
Karina Kwiatek
7e98f427c6 Add endpoint for removing anon blocks 2022-06-15 14:26:48 +02:00
Karina Kwiatek
f379845615 Add frontend for blocking anonymous users 2022-06-15 14:26:48 +02:00
Karina Kwiatek
4e80b4f9ab Prevent anon questions from being sent while blocked 2022-06-15 14:26:48 +02:00
Karina Kwiatek
1a68c1b46f Rename author_email field to author_identifier 2022-06-15 14:26:48 +02:00
Karina Kwiatek
c8b6689a61 Fix error messages for reacting & listing errors 2022-06-13 11:56:34 +02:00
Karina Kwiatek
6a15a323cf Add tests for reacting to comments while blocked/blocking 2022-06-13 11:56:34 +02:00
Karina Kwiatek
0eb3f53b45 Add tests for asking questions while blocked 2022-06-13 11:56:34 +02:00
Karina Kwiatek
04243c2ec8 Appease the dog overlords 2022-06-13 11:56:34 +02:00
Karina Kwiatek
ea3bbcef17 Update question controller block handling to account for users not being logged in 2022-06-13 11:56:34 +02:00
Karina Kwiatek
febbee1306 Simplify error handling in answer create method
We were previously catching all exceptions when creating the answer and returning a generic error.
As exception handling is done in `AjaxController`, we don't need to do this and can get more specific error messages instead.
2022-06-13 11:56:34 +02:00
Karina Kwiatek
14dfef6a52 Add status messages for blocking/unblocking users 2022-06-13 11:56:34 +02:00
Karina Kwiatek
d67ae1eb19 Only accept users to relationship use cases
Dry Types was having issues with taking either an object or string so it's easier to deal with just passing in an object directly
2022-06-13 11:56:34 +02:00
Karina Kwiatek
56799f60c7 Disallow adding blocked users to lists 2022-06-13 11:56:34 +02:00
Karina Kwiatek
9f06b48569 Disallow creating questions when blocked by the user being asked 2022-06-13 11:56:34 +02:00
Andreas Nedbal
79dbf7d1c8 Add translations for mute rule controller actions 2022-02-18 12:50:27 +01:00
Karina Kwiatek
3b1287c424 Apply suggestions from @nilsding
Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
2022-01-23 16:48:53 +01:00
Karina Kwiatek
731ee4bf69 Address review comments from @nilsding 2022-01-23 16:48:53 +01:00
Karina Kwiatek
677ce26e6c Use generic handling of our own exceptions
Noticed that we shouldn't be trying to catch specific exceptions as `Dry::Types` will throw its own exceptions for validation errors.
2022-01-23 16:48:53 +01:00
Karina Kwiatek
29d46b43db Fix lint error; use fail message for relationship create failures 2022-01-23 16:48:53 +01:00
Karina Kwiatek
8d59ef9398 Use screen_name instead of target_user param in Ajax::RelationshipController 2022-01-23 16:48:53 +01:00
Karina Kwiatek
b4e0699e82 Fix lint errors 2022-01-23 16:48:53 +01:00
Karina Kwiatek
0ab822c33a Use full translation key for messages 2022-01-23 16:48:53 +01:00
Karina Kwiatek
d609435f7c Update Ajax::RelationshipController to use usernames; Test Use Case 2022-01-23 16:48:53 +01:00
Karina Kwiatek
3962671135 Implement relationship logic as use case 2022-01-23 16:48:53 +01:00
Karina Kwiatek
7677ed21a4 Update tests for unbanning users 2022-01-02 19:50:44 +01:00
Karina Kwiatek
9a35584284 Refactor ban-related functionality into use cases 2022-01-02 19:50:01 +01:00
Karina Kwiatek
be0cf69368 Refactor existing ban-related methods 2022-01-02 19:50:01 +01:00
Karina Kwiatek
6c0e6b1d30 Create mute rules AJAX controller 2022-01-01 00:38:38 +01:00
Karina Kwiatek
c31ab3578d Apply mute filters to questions asked directly 2022-01-01 00:38:38 +01:00
Karina Kwiatek
065e56ccf1 Replace New Relic with Sentry 2021-12-28 18:32:03 +01:00
Karina Kwiatek
f28f714457 Allow retries for ShareWorker 2021-12-25 13:40:21 +01:00
Karina Kwiatek
56786ebb38 Add direct field to questions
Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
2021-08-11 16:56:58 +02:00
Georg Gadinger
b58883e004 Remove "ask a group" feature 2020-05-25 18:34:43 +02:00
Georg Gadinger
ea0685136e Rename Groups to Lists
haha regexp go brrr

special thanks to @seatsea for helping me out with the French locales
2020-05-25 18:04:54 +02:00
Andreas Nedbal
53979580d8 Merge branch 'master' into feature/bootstrap 2020-05-04 23:19:54 +02:00
Georg Gadinger
0109322610 add spec for Ajax::ModerationController 2020-05-01 22:41:26 +02:00
Georg Gadinger
3e95d5ebeb add spec for Ajax::ReportController 2020-05-01 10:17:05 +02:00
Georg Gadinger
6f3f3afa2f add spec for Ajax::GroupController 2020-05-01 10:17:05 +02:00
Georg Gadinger
54532c71e1 add spec for Ajax::QuestionController
also fix some minor annoyances
2020-05-01 10:17:05 +02:00
Georg Gadinger
1824fb1c25 add spec for Ajax::InboxController 2020-05-01 10:17:05 +02:00
Andreas Nedbal
91a7f7ed33 Fix wrong partial in Ajax::CommentController#create 2020-04-29 14:01:48 +02:00
Andreas Nedbal
b22c7d358c Fix wrong partial path in Ajax::AnswerController#create 2020-04-29 13:33:53 +02:00
Andreas Nedbal
45b11bddfd Merge branch 'master' into feature/bootstrap 2020-04-29 02:49:07 +02:00
Georg Gadinger
2f2b9ab1f4 New Relic be like: *notices your errors* OwO what's this? 2020-04-28 20:32:36 +02:00
Georg Gadinger
e07d069c73 Refactor Ajax::*Controllers
Also removed the unused `Ajax::QuestionController#preview` method and
route
2020-04-28 20:28:00 +02:00
Andreas Nedbal
e9e0a222b0 Merge branch 'master' into feature/bootstrap 2020-04-27 02:11:54 +02:00
Karina Kwiatek
926631eca3 Remove more left-over references to role fields 2020-04-25 22:23:37 +01:00