Commit Graph

869 Commits

Author SHA1 Message Date
Neil Lalonde
8cee3a9fcd Add a way to add email to block list when nuking a user 2013-07-29 15:29:43 -04:00
Neil Lalonde
5f8a130277 Add BlockedEmail, to block signups based on email. Track stats of how many times each email address is blocked, and last time it was blocked. Move email validation out of User model and into EmailValidator. Signup form remembers which email addresses have failed and shows validation error on email field. 2013-07-29 15:29:43 -04:00
Neil Lalonde
e25638dab0 add a way to delete posts and topics when deleting a user with UserDestroyer 2013-07-29 15:29:43 -04:00
Neil Lalonde
a8df9778b5 Rename AdminLog to StaffActionLog 2013-07-29 15:29:43 -04:00
Sam
4a20d09523 distributed memoizer added to ensure absolute duplicate posts don't get through
in case of an absolute dupe just return the memoized post

This works around issues with wordpress being crazy
2013-07-29 12:25:19 +10:00
Robin Ward
c28b377494 Don't redirect to arbitrary URLs via link tracker 2013-07-26 12:14:11 -04:00
Sam
d51dcd1705 improve email styling, include extra respond link 2013-07-26 17:27:46 +10:00
Sam
85389e8b86 spec for trashable 2013-07-26 14:41:58 +10:00
Sam
d0f50cb266 fixing up moment locales, they were not set up properly 2013-07-25 11:09:29 +10:00
Sam
9351a7bcb1 Merge pull request #1244 from stephankaag/rails4updates
Rails 4 updates
2013-07-24 14:16:32 -07:00
Stephan Kaag
f99acebdaa Rails 4 updates 2013-07-24 21:09:18 +02:00
Robin Ward
2319a824f8 Special work to never include previous posts in parsed emails. Also a new attempt
to catch reply strings in different languages.
2013-07-24 14:22:32 -04:00
Sam
0a7bbb08e1 fix broken build 2013-07-24 17:24:55 +10:00
Sam
cb5ce3aab9 Merge pull request #1247 from sir-pinecone/strip-spaces-from-login
Strip leading/trailing spaces from login
2013-07-24 00:16:55 -07:00
Michael Campagnaro
b223cdb493 Strip spaces from group names upon creation 2013-07-24 00:00:17 -04:00
Michael Campagnaro
25f8692a79 Strip leading/trailing spaces from login 2013-07-23 23:03:38 -04:00
Sam
38b8e9b1b4 get rake autospec working in rails 4 2013-07-24 11:49:26 +10:00
Régis Hanol
be9217d4c8 add server-side filesize check on uploads 2013-07-24 00:54:41 +02:00
Neil Lalonde
cf102be953 Allow deletion of a post belonging to a deleted topic, so that users can be destroyed 2013-07-23 11:50:58 -04:00
Sam
9ac6c6e2e9 Merge pull request #1233 from sir-pinecone/improve-group-deletion
Add confirmation modal to admin group deletion
2013-07-23 00:43:06 -07:00
Sam
ef201e02d7 Merge pull request #1238 from ZogStriP/moar-bullets
change the pipe into a bullet in the lightbox overlay
2013-07-23 00:41:47 -07:00
Sam
478ae6d6c7 correct bug where delete stub job would fail when attempting to delete stubs off deleted topics
skip deleting stubs if a post is actively flagged
2013-07-23 16:11:44 +10:00
Sam
060c79ecc0 remove dupes before correcting topic_ids in user action consistency check job 2013-07-23 12:44:20 +10:00
Sam
4b269de724 correct: http://meta.discourse.org/t/cant-save-adding-a-group-permission-to-a-category/8537
can not save category after adding a new custom group
2013-07-23 10:10:36 +10:00
Sam
0acc96c94e work around for http://meta.discourse.org/t/activerecord-statementinvalid-exception-raised-in-models-user-action-rb/7275/4 2013-07-23 09:48:18 +10:00
Sam
7b1f9928e4 staff can change trust levels 2013-07-23 09:13:48 +10:00
Régis Hanol
dbf6fb0232 change the pipe into a bullet in the lightbox overlay 2013-07-22 22:41:08 +02:00
Robin Ward
fd1d376975 Merge pull request #1235 from stephankaag/remove_all
Remove some calls to `all`
2013-07-22 12:26:00 -07:00
Robin Ward
3e7b418ea8 First Try: Include Post History (context) in Notification Emails 2013-07-22 15:06:37 -04:00
Stephan Kaag
0e3b8fbb24 Remove some calls to all. They are not required, and Rails4 raises warnings about them. 2013-07-22 20:44:11 +02:00
Robin Ward
ed745c3fdd Merge pull request #1222 from ZogStriP/fix-s3-related-issues
Fix s3 related issues
2013-07-22 07:30:41 -07:00
Robin Ward
80a0943f54 Merge pull request #1228 from ZogStriP/fix-thumbnailing-with-cdn-enabled
FIX: thumbnailing isn't working with CDN enabled
2013-07-22 07:22:59 -07:00
Robin Ward
8b181e0803 Merge pull request #1230 from ZogStriP/add-newuser-max-attachments-setting
add newuser-max-attachments setting
2013-07-22 07:22:23 -07:00
Sam
1f3c5cb656 allow end user to recover a post they delete
automatically delete stubs after 1 day
2013-07-22 17:48:47 +10:00
Michael Campagnaro
9616767bff Add confirmation modal to admin group deletion 2013-07-22 02:48:23 -04:00
Sam
58e7c3e1f3 push some work out of AR callbacks into PostCreator, add a couple of helpers for post and topic creation in test
fix it so the auto_track false marks topics as new
2013-07-22 15:07:20 +10:00
Sam
31bb08bcdd added an option to bypass auto tracking of topics on post creation 2013-07-22 15:07:20 +10:00
Sam
9e4b0df7ff 69 specs fail in rails 4 now ...not too bad 2013-07-22 15:07:20 +10:00
Régis Hanol
2986798ba7 add newuser-max-attachments setting 2013-07-22 02:39:17 +02:00
Régis Hanol
649ab85740 FIX: thumbnailing wasn't working with CDN enabled 2013-07-22 00:37:23 +02:00
Régis Hanol
945ee5dda0 opps. missed a comment 2013-07-20 12:13:31 +02:00
Régis Hanol
33977252c9 rollback to previous s3 syntax (ie. subdomains) 2013-07-20 11:30:36 +02:00
Régis Hanol
8406a4230c FIX: click tracking on attachments wasn't working 2013-07-19 01:27:09 +02:00
Robin Ward
751b757c1d FIX: Some failing specs 2013-07-18 12:26:38 -04:00
Sam
81616a46ba db consistency check for mismatching topic_ids in user_actions
fix up post mover so it remaps user actions as well
move specs for post mover into post_mover_spec
2013-07-17 16:40:56 +10:00
Sam
c2be81a76e Merge pull request #1199 from ZogStriP/uploads
adds the `max_attachment_size_kb` setting
2013-07-16 23:03:42 -07:00
Régis Hanol
5c27dd175a make sure we handle both s3 url formats 2013-07-17 00:32:09 +02:00
Régis Hanol
7ae2fe304d renamed s3 to s3_store 2013-07-17 00:27:52 +02:00
Régis Hanol
f40cad0f4b changed s3 urls to using the folder convention 2013-07-17 00:27:52 +02:00
Régis Hanol
3136638b4b FIX: CDN doesn't work with S3 2013-07-16 22:16:33 +02:00
Robin Ward
75282576b9 Merge pull request #1195 from initforthe/post-analyser-backtrace-fix
Post analyser backtrace fix
2013-07-16 07:34:54 -07:00
Sam
c49731a91b fix failing server side quote localisation change 2013-07-16 17:48:48 +10:00
Sam
943f88fb88 make specs more robust 2013-07-16 16:18:05 +10:00
Sam
352ac9e60c Finalize read only and post only categories, finished off UI work 2013-07-16 15:46:11 +10:00
Sam
ecf17cfebb work in progress, add fidelity to category group permissions (full, create posts, readonly) 2013-07-16 15:46:11 +10:00
Régis Hanol
5ce05ff5cb adds the max_attachment_size_kb setting
so that we can specify a different max upload size for attachments and images.
2013-07-16 02:01:36 +02:00
Robin Ward
0e504aac9b FIX: You can reset your password even if logins are required. 2013-07-15 12:12:54 -04:00
Robin Ward
ed60f24502 Merge pull request #1194 from ZogStriP/uploads
[Upload] Great deal of renaming
2013-07-15 07:06:18 -07:00
Robin Ward
19e0feac75 Merge pull request #1185 from novemberkilo/master
Reduce complexity of TopicView
2013-07-15 07:05:41 -07:00
Tom Russell
f3279a67fc Failing test 2013-07-15 11:22:59 +01:00
Régis Hanol
00d7d8b809 ooops, fixed CookedPostProcessor specs 2013-07-15 00:18:17 +02:00
Régis Hanol
3397c2235f display the size of the attachment in the preview
instead of adding it during post processing
2013-07-14 12:28:24 +02:00
Régis Hanol
6f2ce93ab2 FIX: create an upload when FastImage throws an exception
FastImage might throw an exception when it isn't able to recognize a
file as being an image (ie. happens when users changes the extension
manually)

Also improved upload specs a lot
2013-07-13 23:42:19 +02:00
Stephan Kaag
9c243aa9ce Simplify avatar lookup class 2013-07-12 23:10:21 +02:00
Robin Ward
a43ed88699 Prefer your own topics in Suggested 2013-07-12 14:38:20 -04:00
Robin Ward
6ca5df0a09 Can recover deleted topics. Deleted topics show the first post as deleted in the UI. 2013-07-12 12:09:17 -04:00
Navin
9c5b5e3c7d Refactor TopicView - extract filter method to FilterBestPosts
Still much to do but this should reduce the complexity scores
for TopicView
2013-07-12 15:54:54 +02:00
Robin Ward
89152116c6 Only send digests to active users 2013-07-11 18:47:36 -04:00
Robin Ward
19c169540c Staff can enter and view deleted topics 2013-07-11 16:39:35 -04:00
Robin Ward
7fd8bb75d9 Merge pull request #1177 from ZogStriP/attachments
Attachments
2013-07-11 06:49:20 -07:00
Sam
1aef6de4b0 automatically approve invited users on forum where moderators must approve (keep in mind only moderators can invite)
speed up specs a touch
allow invite controller to accept an email in absence of user (cleans up API)
2013-07-11 11:22:00 +10:00
Régis Hanol
b94d26d798 update back-end specs 2013-07-10 22:59:54 +02:00
Neil Lalonde
8814f9ed05 Fix a case when a staff user views a topic with a deleted post by a nuked user; might be a temporary solution until we decide what to do with nuked records 2013-07-10 16:52:47 -04:00
Robin Ward
cc47616cdb Merge pull request #1157 from abbat/email-custom-headers
Add custom headers for email messages
2013-07-10 07:12:51 -07:00
Neil Lalonde
7977deb3bf Don't allow editing of title and category of an archived topic 2013-07-09 16:54:46 -04:00
Robin Ward
b7327942af Add deleted_by to Trashable tables 2013-07-09 15:46:36 -04:00
Neil Lalonde
baf698f3c9 Merge pull request #1127 from rylnd/refactor_tmp_directory
Refactor #tmp_directory into helper module
2013-07-09 12:17:42 -07:00
Neil Lalonde
ba7a4e9845 Merge pull request #1165 from novemberkilo/feature/log-trust-level-boosts
Log all changes of user trust level by an admin
2013-07-09 12:16:08 -07:00
Ryland Herrick and Vipul A M
591a5c0e13 Refactor temp directory methods into helper module 2013-07-09 13:59:31 -05:00
Neil Lalonde
3c38062802 Check for updates: edge cases when the message on the dashboard doesn't make sense. 2013-07-09 14:01:08 -04:00
Anton Batenev
b0dbb0ea13 And add tests for empty string & null 2013-07-09 20:19:10 +04:00
Robin Ward
d98f288aa4 FIX: Recovering a deleted post was not updating a topic's statistics 2013-07-09 12:15:55 -04:00
Robin Ward
5cda0e556c Merge pull request #1111 from jamesaanderson/flash-video-onebox
Add flash video onebox support
2013-07-09 06:55:56 -07:00
Neil Lalonde
806bd98f99 Update category's topic_count immediately when trashing or recovering a topic; this ensures that a category can be deleted without waiting for the category_stats job to run. 2013-07-08 15:23:20 -04:00
Robin Ward
cfc4dda9ff FIX: OpenGraph should feature the desired post, if found in the set. 2013-07-08 12:21:39 -04:00
Robin Ward
013ad0fdda Added In-Reply-To and References email headers. Additionally removed username from
email replies and new posts to keep the subjects collapsable.
2013-07-08 11:48:40 -04:00
James A. Anderson & Jalil Mohammed
d51a3cf50f Add flash video onebox as disabled setting by default 2013-07-08 06:37:44 -07:00
Navin
45d85f4054 If the change doesn't go through, don't log anything 2013-07-08 12:51:35 +02:00
Navin
d77ce23de2 Log all changes of user trust level by an admin 2013-07-08 11:53:22 +02:00
Sam
f1a31cd9e6 Merge pull request #1163 from ZogStriP/refactor-cooked-post-processor
refactored CookedPostProcessor
2013-07-07 22:01:48 -07:00
Sam
f6a8f6cfe5 don't notify on moderator actions, they just cause noise,
also filter out pms properly while at it
2013-07-08 12:44:55 +10:00
Sam
91238af6f1 correct failing specs 2013-07-08 12:25:38 +10:00
Régis Hanol
ac7253a938 refactor CookedPostProcessor & specs 2013-07-08 01:39:08 +02:00
Anton Batenev
4e04c4dddd Add custom headers for email messages
See http://meta.discourse.org/t/custom-headers-in-emails-site-settings/7480
2013-07-07 04:37:44 +04:00
Régis Hanol
6251935b1e removed auto_link_images_wider_than setting 2013-07-06 22:19:16 +02:00
Robin Ward
6cd6484b5e New mode for Wordpress: Filter ONLY posts liked by moderators 2013-07-05 16:07:24 -04:00
Robin Ward
58d082d01e OOPS: Left in some debugging info in specs. Removed 2013-07-05 15:06:21 -04:00
Robin Ward
4c90b16681 FIX: Next pages were missing on <noscript> content. Also fixed some long standing bugs. 2013-07-05 14:45:54 -04:00
Neil Lalonde
84ce04dfa5 Use POST for send_activation_email action 2013-07-05 12:26:46 -04:00
Sam
50767be722 user where as opposed to find to compensate for deleted topics 2013-07-05 15:21:04 +10:00
Sam
9afea0ed07 spec for change 2013-07-05 14:23:29 +10:00
Robin Ward
07ebd20776 Merge pull request #1143 from ahx/fix-cas-email-name-and-improve-authentication-specs
Improve the omniauth controller specs. Fix the email provided by CAS. Get name from CAS attributes.
2013-07-04 14:48:52 -07:00
Robin Ward
ea11286ab6 Merge pull request #1131 from novemberkilo/feature/temporary-boost-trust-levels
Feature: Admin can modify user trust levels
2013-07-04 06:57:59 -07:00
Andreas Haller
661f2057f7 Improve the omniauth controller specs. Fix the email provided by CAS. Get name from CAS attributes.
* Make omniauth controller specs more robust by using shared examples for all authentication providers in controller spec. – Still passing. Yay!

* Return "casuser", instead of "casuser@" when no cas_domainname is configured.

* If no cas_domainname is configured, the CAS authentication would return "casuser@" for the users email field, because it tried to assume the email adress of the CAS user by it's username + cas_domainname.
  Now it just returns the username instead of adding an "@" if cas_domainname is not configured.
  This especially makes sense on CAS setups where the username equals the users email adress.
  The old behaviour, if cas_domainname is configured, was not changed.

* Fetch the email from CAS attributes if provided
  If the cas:authenticationSuccess (handled via omniauth-cas) response gives us an email use that.
  If not, behave as before (username or username@cas_domainname).

* Fetch the (full) name from CAS attributes if provided
  If the CAS response by omniauth provides a [:info][:name] field, prefer this over the uid, because we want the name to be a "Full Name", instead of just a "shortname"
2013-07-04 12:01:39 +02:00
Sam
b662cb6c02 If a user read to the end of an auto closing topic, when it is closes just pretend they read the close message. 2013-07-04 11:47:12 +10:00
Robin Ward
7504da13e3 FIX: Whitespec in specs changed. We should really figure out a better way of ensuring correctness here. 2013-07-03 19:24:49 -04:00
Sam
f08e9d8822 Merge pull request #1142 from ZogStriP/fix-can-no-longer-paste-image-in-chrome-post-editor
FIX: can no longer paste image in Chrome post editor
2013-07-03 16:08:51 -07:00
Régis Hanol
5a56af03bc FIX: can no longer paste image in Chrome post editor 2013-07-04 00:39:23 +02:00
Neil Lalonde
41729aab14 Stub site setting methods instead of setting them 2013-07-03 16:54:41 -04:00
Neil Lalonde
2c8ed8414c If an auto-closing topic is manually closed, remove the auto-close countdown 2013-07-03 16:54:41 -04:00
Navin
3da37506da Back end - temporary boosting of trust levels 2013-07-03 10:30:40 +02:00
Sam
4d4a5735d2 logic to bypass trust level filter for high scoring posts 2013-07-03 12:37:17 +10:00
Robin Ward
05fe33111e FIX: Moving a post should also update its TopicLink records 2013-07-02 16:42:25 -04:00
Robin Ward
7f70bc3bbd Add discourse.forum to all List-Ids 2013-07-02 15:21:34 -04:00
Neil Lalonde
075ed1ab53 Refactor user blocking code; hide the Block button in admin 2013-07-02 14:42:53 -04:00
Robin Ward
fab1be7c8e Adds a List-Id header to outgoing mail 2013-07-02 14:13:46 -04:00
Robin Ward
5770879472 Refactor: Move Topic Details into better objects, identity map, tests, query string filters 2013-07-02 10:36:46 -04:00
Sam
f6b850e7a4 allow skipping the validations on creation if its an api call AND skip_validations is specified
this allows wordpress plugin to post very very short titles or titles that would otherwise be disallowed
2013-07-02 12:23:19 +10:00
Sam
46c6949b6e Merge pull request #1123 from stephankaag/rails4-new
Refactor routes in order to be compatible with Rails 4
2013-07-01 16:07:22 -07:00
Stephan Kaag
e39cc464b1 Refactor routes in order to be compatible with Rails 4 2013-07-01 20:00:06 +02:00
Sam
b92e912ac9 add min replies, min score and min trust level params for wordpress 2013-07-01 21:29:45 +10:00
Robin Ward
023d18cab2 FIX: Admins should be able to post short titles. This is especially important for when syndicating
a blog via the wordpress plugin into Discourse.
2013-06-29 17:57:10 -04:00
Robin Ward
e076661759 Merge pull request #1110 from ZogStriP/fix-updating-min-topic-title-length-needs-a-restart
FIX: updating  needs a restart
2013-06-29 14:10:49 -07:00
Sam
e77c396a19 Merge pull request #1107 from ZogStriP/patch-1
Removed a debug leftover
2013-06-29 04:12:52 -07:00
Régis Hanol
121d08e25f FIX: updating needs a restart 2013-06-29 03:49:54 +02:00
Régis Hanol
9656759ecf fix deep link to post in search 2013-06-29 03:22:17 +02:00
Régis Hanol
2ccf339437 Removed a debugging "put" 2013-06-28 23:16:13 +02:00
Neil Lalonde
a352b70bfc Permit changing my own username's case without an error saying it is already taken 2013-06-28 16:21:46 -04:00
Neil Lalonde
b37b6ce664 Minor spec clean-up 2013-06-28 14:43:35 -04:00
Robin Ward
2deaf8ef98 Custom Wordpress Serializer and Path, with Specs 2013-06-28 13:56:13 -04:00
Robin Ward
6106057328 FIX: Can view best filter while logged in 2013-06-28 12:20:06 -04:00
Sam
1ec12fc808 this spec is just refusing to work on jenkins 2013-06-28 16:07:36 +10:00
Sam
ca6325a3fe a pile of complicated and hard to follow specs were replaced by something that makes sense to old people like myself 2013-06-28 15:38:47 +10:00
Sam
3c67cf8acd remove timecop, specs were failing and we can avoid it here anyway 2013-06-28 15:14:44 +10:00
Sam
4512956c68 don't run the wrong sentinel on message, message is validated in the post, in effect some flags were being rejected incorrectly 2013-06-28 12:14:40 +10:00
Neil Lalonde
8e50b49cf1 Try to fix specs that are failing in jenkins 2013-06-27 17:23:06 -04:00
Neil Lalonde
1355c1e3b0 Fix links to uncategorized when SiteSetting.uncategorized_name is set 2013-06-27 16:16:06 -04:00
Neil Lalonde
5d6ad8f39c Show a useful message when a banned user tries to log in 2013-06-27 15:14:42 -04:00
Sam
6145e99baa navigate to message fixed, changed to button
added spec to catch this regression in future
2013-06-27 16:59:07 +10:00
Jeff Atwood
63d967e634 Merge pull request #1097 from ZogStriP/blob-blob-blob
provide a way to give a default filename to pasted images...
2013-06-26 16:24:51 -07:00
Neil Lalonde
278ae7e413 Fix exporter spec brokenness in random mode 2013-06-26 17:02:24 -04:00
Régis Hanol
72745d257d provide a way to give a default filename to pasted images in the lightbox overlay 2013-06-26 21:54:08 +02:00
Neil Lalonde
03afe9280d Fix failing import spec with seed 30239 2013-06-26 11:42:52 -04:00
Sam
38abac8877 no idea why, but jenkins does not like this pending spec 2013-06-26 16:38:52 +10:00
Sam
bb0c3302f3 oddly enough having this code in a pending block causes an error in jenkins 2013-06-26 16:28:07 +10:00
Sam
48d7a33157 Flag UI now displays deleted status for post/topic correctly on old flags
Commented out a spec that was failing in order random, with a TODO
2013-06-26 16:18:50 +10:00
Sam
148d2f2cd4 bug fixes 2013-06-26 16:00:17 +10:00
Sam
65dc04c00e simplify flag reporting and correct it so it properly displays old flags 2013-06-26 15:57:55 +10:00
Régis Hanol
d3eae56e71 soften the lightbox overlay 2013-06-26 02:44:20 +02:00
Sam
92562c2090 Merge pull request #1057 from house9/list-controller-1
refactor list_controller
2013-06-25 17:36:56 -07:00