Commit Graph

188 Commits

Author SHA1 Message Date
Scott Albertson 51eff92170 Refactor UsersController#create
* Simplify controller action
* Extract service classes
2013-12-05 10:11:16 -08:00
Neil Lalonde 69cc1dd689 FIX: don't suggest a username that's already taken, even if hub finds a match 2013-11-20 14:56:21 -05:00
Neil Lalonde 981d8f6aea Signup form: prefill username if Discourse Hub has a match for the email address. Also, fix some bad specs in username_checker_service_spec that were passing... 2013-11-19 14:15:28 -05:00
Scott Carleton 32e414690a Handle ugly url targets 2013-11-14 13:14:02 -05:00
Régis Hanol 7e7d951152 do not pull hotlinked images when max_image_size_kb == 0 2013-11-13 17:30:48 +01:00
Robin Ward 6e43372e7c Merge pull request #1610 from salbertson/sa-refactor-users-update
Move logic for updating a user to a service class
2013-11-07 12:29:19 -08:00
Neil Lalonde 0c6f794eb0 Used the term suspended instead of banned. 2013-11-07 13:53:49 -05:00
Scott Albertson 72bfa4471f Move logic for updating a user into a service class 2013-11-07 08:39:39 -08:00
Neil Lalonde 92a0729937 When banning a user, a reason can be provided. The user will see this reason when trying to log in. Also log bans and unbans in the staff action logs. 2013-11-01 10:47:26 -04:00
Neil Lalonde 52b0c1c45f When logging the deletion of a user, don't store its id in the target_user_id column. It will never match a user record. 2013-11-01 10:47:26 -04:00
Robin Ward f7d6ab579c Merge pull request #1571 from novemberkilo/master
Refactor User#update_last_seen! and User#update_tracked_topics
2013-10-29 08:28:08 -07:00
Neil Lalonde 4e46d91b8d Refactor SpamRulesEnforcer so that each spam rule is in its own class 2013-10-25 13:25:02 -04:00
Navin Keswani 6ce80fd148 Refactor User#update_last_seen! and User#update_tracked_topics 2013-10-23 23:27:30 +02:00
Neil Lalonde 8aab2253d0 Whitelisted ip addresses will not be flagged as spam by flag_sockpuppets 2013-10-23 17:11:35 -04:00
Neil Lalonde c1008f4359 Fixes for postgresql inet columns in Rails 4. They're backed by an IPAddr class now, which breaks sql parameter marker support, and automatically sets the attribute to nil when trying to assign an invalid ip address. 2013-10-22 19:19:32 -04:00
Scott Carleton cbef844a57 Build out a URI Adapter to allow uploading an avatar via a url
Currently only really accessible via the API. The UriAdapter creates a
tempfile from a url and gives a ActionDispatch::HTTP::UploadedFile back
to the controller to process as normal.
This will help a lot in being able to transfer avatar urls from another
app without monkey patching a lot of discourse code.
2013-10-21 14:53:03 -04:00
Neil Lalonde c7aaee907b When system flags users as sockpuppets, show a reason in the admin flags ui 2013-10-16 11:47:16 -04:00
Neil Lalonde 3c2c6ab24b Add sockpuppet spammer detection. Automatically flag posts if they are from new users (registered less than 24 hours ago) at the same IP address and one of them started the topic. 2013-10-11 13:34:05 -04:00
Neil Lalonde ba2c4139fe Use absolute urls in notifications for automatic spammer handling. 2013-09-16 15:07:58 -04:00
Neil Lalonde e8ef55c446 Rename StaffActionLog to UserHistory 2013-09-10 22:01:20 -04:00
Einar Jonsson 724b3aadcf Extracted nickname registration out of the UsersController and into its
own service.
2013-09-09 09:26:50 +00:00
Neil Lalonde 3708d47c87 Check daily if there are new users who need to be approved and send a pm to moderators 2013-08-26 16:16:27 -04:00
Neil Lalonde 47add6da70 Log when a site customization is deleted 2013-08-21 12:33:24 -04:00
Neil Lalonde a95303fcd8 Log site customization changes. Use a modal to show staff action log details for site customizations. 2013-08-21 12:33:24 -04:00
Neil Lalonde 1d030666d8 Log site setting changes and show in admin 2013-08-19 16:58:38 -04:00
Neil Lalonde 7eaedb84e1 Add notify_mods_when_user_blocked site setting to control whether moderators get a message when someone is automatically blocked 2013-08-19 12:00:48 -04:00
Neil Lalonde ed060ed5f1 Change trust level logs the previous trust level 2013-08-13 12:04:28 -04:00
Neil Lalonde 949b2068a5 Trust level change logs the target_user_id 2013-08-07 17:01:59 -04:00
Neil Lalonde 8cc49d9797 Don't send more pm's after a user has been blocked from making posts. This can happen if a staff member flags posts that are already hidden. 2013-08-02 10:55:19 -04:00
Neil Lalonde e076158789 Add ip_address, email, and context to staff_action_logs table. Context should usually be the url from which the staff member performed the action, but could be any string that describes what the staff member was doing when the action was performed. 2013-07-29 15:29:43 -04:00
Neil Lalonde a8df9778b5 Rename AdminLog to StaffActionLog 2013-07-29 15:29:43 -04:00
Stephan Kaag 2abfd38aee Refactor code that raises deprecating warnings in Rails 4 2013-07-08 18:35:11 +02:00
Robin Ward 07791ea471 Fix update statement for Rails 4 preparation 2013-07-03 11:17:16 -04:00
Neil Lalonde 075ed1ab53 Refactor user blocking code; hide the Block button in admin 2013-07-02 14:42:53 -04:00
Neil Lalonde 246148d4ff Make topics invisible when first post is automatically hidden because of spam flags 2013-06-12 16:02:11 -04:00
Neil Lalonde 9b1d0baf45 Send a message to moderators when a newuser_spam_host_threshold is exceeded. Send it no more than once per day per user. 2013-06-10 13:17:32 -04:00
Neil Lalonde 564d242832 Notify moderators when someone is automatically blocked because of spam flags 2013-06-06 18:49:19 -04:00
Neil Lalonde c4904aacc0 Automatically flag someone as a spammer if their posts get at least X spam flags from N users while their trust level is 'new user'. Staff can clear and set this status from the user record in admin. 2013-06-03 16:37:40 -04:00