Commit Graph

5341 Commits

Author SHA1 Message Date
Guo Xiang Tan
dcba320bf6 Remove spec that isn't testing for anything. 2018-06-05 09:30:02 +08:00
Arpit Jalan
46fc57222f FEATURE: improve handling of site setting secrets 2018-06-04 21:31:34 +05:30
OsamaSayegh
bc75cfe4b5 REFACTOR: tags controller specs (#5908) 2018-06-04 14:09:14 +08:00
OsamaSayegh
1f8805d3af REFACTOR: user api keys contoller specs to request 2018-06-04 16:07:53 +10:00
OsamaSayegh
807223deef REFACTOR: notifications controller specs to requests 2018-06-04 16:06:53 +10:00
OsamaSayegh
e4bdafb550 REFACTOR: categories controller specs to requests (#5903)
REFACTOR: categories controller specs to requests
2018-06-04 12:04:32 +08:00
OsamaSayegh
e58ed247f2 REFACTOR: uploads controller specs to requests (#5907) 2018-06-04 11:13:52 +08:00
OsamaSayegh
cfea837e88 REFACTOR: search controller specs to requests (#5906) 2018-06-04 11:12:38 +08:00
OsamaSayegh
9b4a98695e REFACTOR: list controller specs to requests (#5902) 2018-06-04 11:09:59 +08:00
Arpit Jalan
36f9af4fa4 minor optimizations for post rejected logs 2018-06-02 09:44:55 +05:30
Arpit Jalan
89eca87f16 FEATURE: add staff action log for post rejections 2018-06-01 21:48:27 +05:30
Gerhard Schlager
c0bab84dc1 Fix random build error
Spec usually failed when there was an UpdateGravatar job for the system user.
2018-06-01 17:34:19 +02:00
Gerhard Schlager
b970b072f6 FIX: User merge should not fail when primary email address is missing
The merge process might move all email addresses of the source user to the target user. Destroying the source user failed in that case.
2018-06-01 16:23:21 +02:00
OsamaSayegh
474ff94df3 REFACTOR: convert invites controller specs to requests (#5898)
REFACTOR: convert invites controller specs to requests
2018-06-01 13:06:08 +08:00
Guo Xiang Tan
d57a5d3e8c Fix brittle spec. 2018-06-01 11:56:56 +08:00
Guo Xiang Tan
12a0f12530 Fix the build. 2018-06-01 11:24:32 +08:00
Blake Erickson
7750b30016 FIX: Allow a user to remove their title
Somewhere there was a regression and a user couldn't remove their own
title. If they selected '(none)' in the UI it would say it was saved,
but it would not actually be updated in the db.
2018-05-31 17:16:52 -06:00
OsamaSayegh
d4848f2d58 REFACTOR: topics controller specs to requests (#5886)
* REFACTOR: topics controller specs to requests
2018-05-31 22:45:32 +08:00
Guo Xiang Tan
7fc8a36529 DEV: Take 2 Queue jobs in tests by default.
On my machine this cuts the time taken to run our test suite
from ~11mins to ~9mins.
2018-05-31 16:23:23 +08:00
Guo Xiang Tan
56e9ff6853 Revert "DEV: Queue jobs in tests by default."
Too risky for now

This reverts commit be28154d3b.
2018-05-31 15:34:46 +08:00
Guo Xiang Tan
2b783997fa Refactor tests to complete assertions within a single it block. 2018-05-31 15:05:47 +08:00
Sam
5086fdc76d FIX: add protection for scss removal during upgrade
In some cases plugins would remove scss files or change them, but CSS
was still calculated based off stale data in old instance cache
2018-05-31 17:02:48 +10:00
Guo Xiang Tan
be28154d3b DEV: Queue jobs in tests by default. 2018-05-31 14:45:47 +08:00
Guo Xiang Tan
95f9b72351 FIX: Update activation email route was returning a generic json error. 2018-05-31 14:19:43 +08:00
OsamaSayegh
4e21a031df Remove trailing whitespace 2018-05-31 12:31:46 +10:00
OsamaSayegh
23e3a68592 REFACTOR: session controller specs to requests 2018-05-31 12:31:46 +10:00
Guo Xiang Tan
f623740ffc DEV: Stablize DiscourseRedis tests. 2018-05-30 14:45:19 +08:00
Guo Xiang Tan
21e9315416 FIX: Use user account email instead of auth email when totp is enabled.
https://meta.discourse.org/t/github-2fa-flow-broken/88674
2018-05-30 12:15:12 +08:00
Guo Xiang Tan
543b7cddfb FIX: Extra comma resulted in Github auth email result being an array.
https://meta.discourse.org/t/github-2fa-flow-broken/88674
2018-05-30 12:15:12 +08:00
Neil Lalonde
e26a14dc29 FIX: error when flagging to notify moderators because message title is too long 2018-05-29 12:21:47 -04:00
Sam
df815d6c0e DEV: prefer using ordering in relation over default scope 2018-05-29 09:34:12 +10:00
Arpit Jalan
c8bc942333 FIX: do not add invited user to automatic groups 2018-05-28 17:17:48 +05:30
Guo Xiang Tan
81b5d61fa7 FIX: topic_destroyed web hook couldn't find topic. 2018-05-28 17:38:02 +08:00
Gerhard Schlager
ed2ae3cb0a FIX: Load post revisions in correct order 2018-05-28 11:25:24 +02:00
Guo Xiang Tan
123a22e6d8 DEV: Clean up omniauth after mocking. 2018-05-28 15:12:54 +08:00
Guo Xiang Tan
a081771950
Merge pull request #5872 from OsamaSayegh/users-controller-specs-to-request
REFACTOR: users contollers specs => request specs
2018-05-28 13:32:37 +08:00
Sam
e501936405 FIX: search server side error in rare condition 2018-05-28 15:28:18 +10:00
OsamaSayegh
0347c97520 tgxworld feedback 2018-05-28 06:20:47 +03:00
Sam
5a32a70d6c FIX: ColorScheme color missing was returning "nil" 2018-05-28 11:46:00 +10:00
Robin Ward
4195c7c9ea FEATURE: Ability to clear a user's penalty history
You can do this manually if you want to allow them to reach TL3 without
their penalty history counting against them.
2018-05-25 12:54:22 -04:00
Gerhard Schlager
20b94bc714 FIX: Extraction of quoted posts failed in some cases
* It stored only oneboxed "quotes" when [quote] and links to topics or posts were mixed.
* Revising a post didn't add or remove records from the quoted_posts table.
2018-05-25 12:00:17 +02:00
riking
12e4dd59b7 Style fix for test 2018-05-25 15:54:14 +10:00
riking
501bc0e9af FIX: UserProfileView: Do not log IP of logged-in users 2018-05-25 15:54:14 +10:00
Sam
9c91c2509e improve spec stability 2018-05-25 15:16:40 +10:00
Sam
610bfec73e DEV: correct fragile spec 2018-05-25 14:29:11 +10:00
Sam
720a12ce76 correct time dependent spec 2018-05-25 14:26:05 +10:00
Sam
be1b8fc3a8 DEV: ensure specs run in consistent times 2018-05-25 14:22:43 +10:00
Guo Xiang Tan
755b511b5c PERF: Destroy collapsed notifications in 1 query instead of 3. 2018-05-25 12:01:36 +08:00
Sam
80adc1ee80 DEV: stabilize site setting spec
side effects could cause specs to fail in rare conditions
2018-05-25 12:16:00 +10:00
OsamaSayegh
bac0482061 REFACTOR: users contollers specs => request specs 2018-05-25 05:04:25 +03:00
Guo Xiang Tan
58fbe74b6f Remove assertion to_not raise_error.
If an error is raised the test would fail anyway.
2018-05-25 09:57:08 +08:00
Guo Xiang Tan
1f27c91924 DEV: Better diagnostic when topic tracking state tests fail. 2018-05-24 15:36:41 +08:00
Guo Xiang Tan
43f7cb05c9 FIX: Broken ping event for web hooks due to missing payload. 2018-05-24 15:16:52 +08:00
Sam
d366f8d888 remove hack that destabliazed tese suite 2018-05-24 10:48:16 +10:00
Neil Lalonde
3db1032bfd FIX: not found page shouldn't include the Google search form for sites with login_required enabled 2018-05-23 16:59:02 -04:00
Andrew Schleifer
4be0e31459 fix s3_cdn_url when the s3 bucket contains a folder 2018-05-23 15:51:02 -05:00
Ryan Mulligan
fac4bf2f85 ignore emails that are from the reply by email addresses (#5843) 2018-05-23 10:04:45 +02:00
Guo Xiang Tan
ad9e0d6bea
Merge pull request #5848 from OsamaSayegh/fix-social-login-groups
FIX: apply automatic group rules when using social login providers
2018-05-23 08:17:42 +08:00
OsamaSayegh
f6d412465b FIX: apply automatic group rules when using social login providers 2018-05-23 02:26:07 +03:00
Blake Erickson
3edca8b104 Return a 403 instead of 200 when trying to delete a user with posts
See [this commit][1] for more info

[1]: bd352a17bf
2018-05-22 17:02:02 -06:00
OsamaSayegh
609804f5ef REFACTOR: merge posts controller specs into request specs 2018-05-23 08:53:46 +10:00
Sam
45f65859c9 improve erraticly failing spec 2018-05-23 08:39:15 +10:00
Gerhard Schlager
beed676b04 FIX: Check group names when checking username availability 2018-05-22 21:55:54 +02:00
Gerhard Schlager
95db5f0c8c FIX: Do not replace wrong avatars when renaming user 2018-05-22 13:41:51 +02:00
Sam
1ac1ee4287 FEATURE: allow registration of an array custom field 2018-05-22 16:48:39 +10:00
Sam
bcfd9cf8b5 attempt to stabilize spec 2018-05-22 16:15:24 +10:00
riking
d4639bc734 TEST: Add TopicLinkClick spec for ip logging 2018-05-22 16:05:38 +10:00
OsamaSayegh
450a600721 REFACTOR: about & badge controllers => requests 2018-05-22 13:45:13 +10:00
Sam
661d89f489 skip erratic spec 2018-05-22 09:42:50 +10:00
Sam
788ca1f112 FIX: stop adding email to unsubscribe url
Instead of adding email to unsubscribe url store it in redis for 1 hour
rate limit calls to unsubscribe endpoint to ensure there is no risk of
bloating redis

Also move controller to request specs
2018-05-22 09:07:03 +10:00
Guo Xiang Tan
37ad2dd936 Fix the build. 2018-05-21 17:59:47 +08:00
Guo Xiang Tan
aae5575d33 Remove spec file that was accidentally added. 2018-05-21 17:35:55 +08:00
Guo Xiang Tan
467d91347a Missing specs for Group, Tag, Category and Flag web hooks. 2018-05-21 17:29:58 +08:00
Guo Xiang Tan
bf84037f79 FIX: Payload for webhooks should be current as of the time the event was triggered.
https://meta.discourse.org/t/group-category-tag-user-deleted-webhooks-not-firing/87752
2018-05-21 17:29:58 +08:00
Guo Xiang Tan
00c6b078e3 Trim WebHookUserSerializer. 2018-05-21 17:29:58 +08:00
Guo Xiang Tan
60e7b13f59 Trim WebHookPostSerializer further. 2018-05-21 17:29:58 +08:00
Guo Xiang Tan
3ff0074e9d Trim WebHookTopicSerializer further. 2018-05-21 17:29:58 +08:00
Sam
ec337bbcb3 DEV: attempt to report last exception as the "cause" for failures
This allows our request specs to report exceptions so we can debug

May have a few false positives but generally should be quiet

TODO only wire magic in for request specs, currently happens for all
2018-05-21 17:01:50 +10:00
Guo Xiang Tan
b7b08b4173 Fix regression introduced in 2ceb107074. 2018-05-21 13:26:23 +08:00
Guo Xiang Tan
2ceb107074 Refactor tests to use the json extension instead of headers. 2018-05-21 09:49:46 +08:00
Arpit Jalan
9f422c93f6 FIX: restrict updates on confirm_old_email email templates 2018-05-19 12:19:59 +05:30
Arpit Jalan
290ee312e6 FIX: handle invalid mailto links 2018-05-18 18:02:52 +05:30
Guo Xiang Tan
b9dfb0ba10 Partially revert 531baec5b5. 2018-05-18 15:01:36 +08:00
Guo Xiang Tan
531baec5b5 Remove unused fabricator. 2018-05-18 13:37:39 +08:00
Guo Xiang Tan
416d19af27 FIX: Wrong target user displayed for user actions in activity stream.
https://meta.discourse.org/t/wrong-assigned-username-in-activity-list/73816
2018-05-18 11:28:13 +08:00
Guo Xiang Tan
417bcc5f2a Remove blank test. 2018-05-18 11:07:57 +08:00
Jeff Wong
04c7dbafa3 FIX: manifest.json better detection at mime type. Find size if uploaded 2018-05-17 14:45:24 -07:00
Jeff Wong
41ffafb65e FIX: best effort at returning correct mime types in manifest.json 2018-05-17 12:14:39 -07:00
Régis Hanol
53f8f6095d FEATURE: staff action logs when creating/updating/deleting badges 2018-05-17 18:09:27 +02:00
Arpit Jalan
9532d9a555 FIX: handle invalid tags 2018-05-17 19:33:12 +05:30
Guo Xiang Tan
b74c108c09 UX: Display group tabs in user's messages tab for non-staff as well.
https://meta.discourse.org/t/group-inboxes-in-user-messages/86787
2018-05-17 18:10:17 +08:00
Guo Xiang Tan
147ea37115 FIX: Missing notification for watching first post users when topic is recategorized.
https://meta.discourse.org/t/not-receiving-notifications-for-announcements/87275/2?u=tgxworld
2018-05-17 16:15:29 +08:00
Arpit Jalan
33899664ce FIX: handle bad user profile website 2018-05-17 13:21:24 +05:30
Arpit Jalan
539cf32f87 FIX: handle encoded mailto links when looking for upload record 2018-05-17 12:44:53 +05:30
Arpit Jalan
aee4045dd0 FIX: suggest name when username/name is provided 2018-05-17 10:36:36 +05:30
Guo Xiang Tan
f21a47eadd Improve specs to assert for the right record instead of just a count. 2018-05-17 08:47:24 +08:00
Régis Hanol
a9ebde5111 FEATURE: new 'staged' users list for admins 2018-05-17 01:52:49 +02:00
Régis Hanol
39aceed63d FIX: don't purge unactivated users with a message 2018-05-16 18:24:11 +02:00
Gerhard Schlager
ae6236d090 FIX: Changing owner of deleted reply didn't work 2018-05-16 17:03:09 +02:00
Régis Hanol
4103783821 FIX: don't use PMs in Incoming Links reports 2018-05-16 16:55:54 +02:00
Régis Hanol
131b7f5da5 make 🤖 rubocop happy 2018-05-16 16:35:04 +02:00
Joe Buhlig
3cd4c82c49 Allow parameters for group and username filters on directory (#5815) 2018-05-16 16:20:17 +02:00
Régis Hanol
5e97a9bfb7 FIX: tags in a 'visible by everyone but usable only by staff' group weren't visible by everyone 2018-05-16 09:48:19 +02:00
Guo Xiang Tan
565fa1f60e Fix regression introduced in 8cf0f51eb2. 2018-05-16 14:26:03 +08:00
Sam
21e0b7c818 avoid async report pattern and replace with simpler hijack 2018-05-16 16:05:03 +10:00
Gerhard Schlager
74c4af279a Improvements to user renaming
* don't update search index if post belongs to deleted topic
* log errors instead of crashing when updating post or revision fails
* update mentions even when the href attribute is missing
* run the background job with low priority
* replace username in all notifications
* update `action_code_who` used by small action posts
2018-05-15 21:05:51 +02:00
Gerhard Schlager
2e1b5bc8d3 FIX: Transaction in UserAnonymizer prevented avatar from updating 2018-05-15 20:47:58 +02:00
Sam
b9c6821261 correct spec 2018-05-15 15:20:36 +10:00
Arpit Jalan
abcb6af8f9 FIX: scrub secret setting values from logs 2018-05-15 09:19:26 +05:30
Régis Hanol
a28c58feb1 FIX: automatic group membership when using SSO 2018-05-15 01:48:30 +02:00
riking
d2347474a5 Tests for IncomingLink IP logging 2018-05-15 09:32:29 +10:00
Joffrey JAFFEUX
e474351ae4
inactive users report is not used anymore 2018-05-14 21:31:14 +02:00
Gerhard Schlager
c67c2dc638 FIX: Username update should ignore revisions without raw 2018-05-14 15:22:42 +02:00
Gerhard Schlager
8232aba743 FIX: Update search index after renaming user within posts 2018-05-14 13:20:30 +02:00
Gerhard Schlager
02cb84847c FIX: Update avatar in oneboxed posts when renaming user 2018-05-14 13:20:29 +02:00
Gerhard Schlager
49392fb105 FIX: Anonymizing user didn't replace uploaded avatar in posts 2018-05-14 13:20:29 +02:00
Régis Hanol
9d9332d8c9 FIX: allow user quotes in HTML digest emails 2018-05-13 18:23:17 +02:00
Régis Hanol
37232fcb58 FIX: staff members should see all tags 2018-05-13 17:50:21 +02:00
Régis Hanol
2cf6fb7359 FIX: always unstage users when they log in 2018-05-13 17:00:02 +02:00
Sam
67054d524d correct missing day from async reports 2018-05-11 15:06:23 +10:00
Sam
8a783412b7 UX: improvements to new dashboard
- remove inactive user report and replace with posts
- clean up internals so grouping by week happens on client
- when switching periods old report was not destroyed leading to bugs
- calculate trend based on previous interval ... not previous 30 days
- show percentages for mau/dau
- be more careful about utc date usage
- show uniqu and click through rate on search panel
- publish key of report with report so we only load the correct one
- subscribe earlier in channel in case of concurrency issues
2018-05-11 13:30:32 +10:00
Blake Erickson
bd352a17bf FIX: Show a json api response when deleting a user with posts
A 500 error was actually caused with no response when using the api, so
it wasn't very clear that you need to delete the posts first when using
the api.
2018-05-10 13:04:36 -06:00
Régis Hanol
86eb3528ec FEATURE: clearer error message when receiving a reply to an old notification 2018-05-09 18:51:01 +02:00
Régis Hanol
6b1ff0edd3 FIX: always update bounce score (instead of doing it once per day) 2018-05-09 16:40:52 +02:00
Guo Xiang Tan
2eb2f273a8 Refactor of PushSubscriptionPusher. 2018-05-09 08:14:14 +08:00
Jeff Wong
7f1f697e97 FIX: de-duplicate push subscriptions - ensure unique user/key 2018-05-08 15:20:39 -07:00
Gerhard Schlager
52db0b31c1 FIX: Automatically add user to groups after updating email address 2018-05-08 21:27:22 +02:00
Arpit Jalan
83245aa508 FIX: better handling of invite links after they are redeemed
FIX: deprecate invite_passthrough_hours setting
2018-05-08 20:17:57 +05:30
Gerhard Schlager
2e67998319 Improvements for user renaming (#5810)
* FEATURE: Update avatars in posts and revisions when user gets renamed

* FIX: Replace username in deleted posts when user gets renamed

* FEATURE: Replace username in notifications when user gets renamed

FEATURE: Update mentions and quotes when user gets merged
2018-05-08 10:02:43 -04:00
Robin Ward
8262fc5d15
Merge pull request #5807 from discourse/min-flags-by-topic
FEATURE: New site setting `min_flags_staff_visibility`
2018-05-08 09:17:29 -04:00
Sam
858a266031 FIX: exact matching should also match on title 2018-05-08 15:59:03 +10:00
Guo Xiang Tan
086cb0f849 Fix brittle spec. 2018-05-08 10:52:03 +08:00
Guo Xiang Tan
8cf0f51eb2 UX: Display site settings shortcut for poll and discourse-nginx-performance-report.
https://meta.discourse.org/t/improving-admin-plugins/84585/29?u=tgxworld
2018-05-08 10:34:32 +08:00
Robin Ward
ac60a84329 FEATURE: New site setting min_flags_staff_visibility
When set higher than 1, flags won't show up for staff in the admin
section unless the minimum threshold of flags on a post is reached.
2018-05-07 16:05:13 -04:00
Guo Xiang Tan
ee1eb1a5bd FIX: Retrigger notification when a topic is recategorized.
https://meta.discourse.org/t/notifications-when-a-topic-is-recategorized/63079
2018-05-07 21:29:06 +08:00
Régis Hanol
a98aae3bcd FIX: topic search wasn't working for unlisted topics 2018-05-07 11:43:55 +02:00
Misaka 0x4e21
ff6be3c2e3 FEATURE: add profile_background fields into SSO (#5701)
Add profile_background and card_background fields into Discourse SSO.
2018-05-07 10:03:26 +02:00
Guo Xiang Tan
21007a4a8d Rewrite push notifications controller specs as request specs.
* Improve assertions to test for the outcome we expected instead
  of just asserting for a 200 response.

* Remove duplicated assertion.
2018-05-07 15:40:46 +08:00
Guo Xiang Tan
ad833c4485 FIX: Don't downcase group name. 2018-05-07 14:02:11 +08:00
Guo Xiang Tan
aa0d32231c FIX: Incorrect query when removing a group owner.
https://meta.discourse.org/t/group-rename-and-group-owners-removal-problems/85596
2018-05-07 13:57:00 +08:00
Guo Xiang Tan
77eb93ffb7 Fabricate records with the right attributes during fabrication. 2018-05-07 11:26:38 +08:00
Jeff Wong
91b31860a1
Feature: Push notifications for Android (#5792)
* Feature: Push notifications for Android

Notification config for desktop and mobile are merged.

Desktop notifications stay as they are for desktop views.

If mobile mode, push notifications are enabled.

Added push notification subscriptions in their own table, rather than through
custom fields.

Notification banner prompts appear for both mobile and desktop when enabled.
2018-05-04 15:31:48 -07:00
Gerhard Schlager
40e22b14f3 Fix specs (didn't work on UTC+xx timezones) 2018-05-04 08:21:57 +02:00
Gerhard Schlager
ee426623e4 Dashboard next: correctly group inactive member count 2018-05-04 07:48:55 +02:00
Gerhard Schlager
41cd8c169c Add specs for inactive users report 2018-05-04 07:48:55 +02:00
Sam
3a06cb461e FEATURE: remove support for legacy auth tokens 2018-05-04 10:12:10 +10:00
Jeff Wong
62a8904729
Feature: Include participants at the bottom of PM emails (#5797)
* Feature: Include participants at the bottom of PM emails

... as undecorated links.

https://meta.discourse.org/t/email-notification-recipients-unclear-when-pm-is-sent-to-multiple-users/26934/13?u=featheredtoast

Fix: missing translation for PM mentions

* display membership count as `group (count)`
2018-05-03 15:50:06 -07:00
Joffrey JAFFEUX
980972182f
dashboard next: caching, mobile support and new charts 2018-05-03 15:41:41 +02:00
Robin Ward
05dddcb2fd Add an event that is triggered when a user is anonymized 2018-05-02 12:25:29 -04:00
Sam
bdd9775869 improve spec 2018-05-02 17:16:00 +10:00
Kyle Zhao
0cc4b42180 FIX: TopicEmbed.import should update title and author 2018-05-02 17:12:31 +10:00
Gerhard Schlager
3be3c50c7e FEATURE: Rename user in mentions and quotes
Co-authored-by: Robin Ward <robin.ward@gmail.com>
2018-05-01 13:49:14 -04:00
Robin Ward
079caf08d6 FIX: leftover debug statement 2018-04-30 14:41:11 -04:00
Robin Ward
e21a4ce1dd FEATURE: Support anonymizing a user's IP addresses 2018-04-30 14:09:03 -04:00
Arpit Jalan
d074a39d39 fix the build 2018-04-27 20:04:24 +05:30
Arpit Jalan
67357b84b9 FIX: only allow one user to be created per invite 2018-04-27 19:21:10 +05:30
Neil Lalonde
f7c4c71409 FIX: title selector needs to flag whether title comes from badge or not 2018-04-26 16:51:11 -04:00
Neil Lalonde
bd77795d7a REFACTOR: move support for user card badge images to a plugin discourse-user-card-badges 2018-04-26 13:25:24 -04:00
Joffrey JAFFEUX
9fabf2543b
dashboard next: activity metrics and new contributors
This commit also introduces a better grouping of data points.
2018-04-26 14:49:41 +02:00
Sam
b26e27bdab correct specs 2018-04-26 17:24:16 +10:00
Sam
88f5251415 FIX: disallow invalid top_menu and post_menu and share_links
In the past any text could be entered there causing big potential issues
2018-04-26 17:00:56 +10:00
Sam
6676bbd38b FEATURE: index YouTube titles in search
Previously we omitted the titles for videos that YouTube provided
2018-04-26 15:46:52 +10:00
Sam
a0cd54750c FIX: inline [code] not handled properly
The text

a
[code]test[/code]

Would eat up the `test` text cause translation from inline to block
for replace rule was not properly handled
2018-04-26 15:18:22 +10:00
Régis Hanol
598aba3261 fix the build 2018-04-25 22:34:23 +02:00
Régis Hanol
ddb092f397 FIX: update mail gem to fix UTF-8 parsing issue 2018-04-25 21:53:37 +02:00
Robin Ward
a5172a37e0 Allow staff members to enable safe mode, even if disabled 2018-04-25 11:49:57 -04:00
Guo Xiang Tan
ee82abba3c Prefer save!/create! over save/create. 2018-04-25 13:39:45 +08:00
Arpit Jalan
65be3c627d further optimize spec 2018-04-25 11:08:38 +05:30
Arpit Jalan
9d7f4cec3e optimize spec 2018-04-25 10:27:56 +05:30
Arpit Jalan
d2cc5452ec add spec for user csv export 2018-04-25 10:22:39 +05:30
Robin Ward
456e40a709 FIX: Don't allow a user to become TL3 if they've ever been penalized
Previously the code would only check if they were *currently* suspended
or silenced.
2018-04-24 15:15:32 -04:00
Gerhard Schlager
ec29869350 FIX: Merging users failed when PM was sent to source and target user 2018-04-24 11:08:29 -04:00
Gerhard Schlager
ed4c0c4a63 FEATURE: Add option to delete all replies of flagged post 2018-04-24 11:08:05 -04:00
Sam
035312d501 FIX: specify path for dosp cookie 2018-04-24 11:07:58 -04:00
Sam
146a6c3592 FIX: exclude topics from latest in /categories on refresh
When you hit refresh on categories page it would not supress correctly
2018-04-24 11:07:26 -04:00
Robin Ward
fd14ee4797 FEATURE: Allow safe mode to be disabled 2018-04-24 11:03:33 -04:00
Arpit Jalan
0a442977b3 FEATURE: add staff action log for post approvals 2018-04-23 11:28:44 +05:30
Guo Xiang Tan
c148500d51 FIX: Deadlock when topic with auto close topic timers exceeds auto_close_topics_post_count. 2018-04-23 13:34:24 +08:00
Guo Xiang Tan
9eabf7c02c Fix randomly failing specs due to SearchLog cache. 2018-04-23 10:10:10 +08:00
Sam
ded84a4b58 PERF: improve performance once logged in rate limiter hits
If "logged in" is being forced anonymous on certain routes, trigger
the protection for any requests that spend 50ms queueing

This means that ...

1. You need to trip it by having 3 requests take longer than 1 second in 10 second interval
2. Once tripped, if your route is still spending 50m queueuing it will continue to be protected

This means that site will continue to function with almost no delays while it is scaling up to handle the new load
2018-04-23 11:55:25 +10:00
Neil Lalonde
70f2c5d3fd FEATURE: move staff tags setting to tag group settings 2018-04-20 15:34:23 -04:00
Guo Xiang Tan
98d880b67a Missed a spot in 45fe5dc793 2018-04-20 13:59:19 +08:00
Guo Xiang Tan
70d181bff8 FIX: Better error message in GroupsController#add_members.
https://meta.discourse.org/t/cant-add-members-to-a-group/85738?u=tgxworld
2018-04-20 10:28:52 +08:00
Arpit Jalan
9a912b9b35 fix the build 2018-04-20 00:39:12 +05:30
Arpit Jalan
91bf10bd12 FIX: create upload record for exported csv files 2018-04-20 00:27:49 +05:30
Joffrey JAFFEUX
0e414d0890
dashboard next: trending search report
This commit also improves how data is loaded sync and async
2018-04-19 18:19:21 +02:00
Régis Hanol
45850a0cd6 FIX: don't break when posting invalid URIs 2018-04-19 12:29:35 +02:00
Joffrey JAFFEUX
01c061d20d
dashboard next: perf and UI tweaks
* cache CORE reports
* adds backups/uploads section
* few css tweaks
2018-04-18 21:30:41 +02:00
Neil Lalonde
5b93d69939 FIX: error when non-staff user edits their topic after a hidden tag is added to it 2018-04-18 12:51:25 -04:00
Arpit Jalan
c61ce66411 fix the build 2018-04-18 13:38:45 +05:30
Sam
59cd7894d9 FEATURE: if site is under extreme load show anon view
If a particular path is being hit extremely hard by logged on users,
revert to anonymous cached view.

This will only come into effect if 3 requests queue for longer than 2 seconds
on a *single* path.

This can happen if a URL is shared with the entire forum base and everyone
is logged on
2018-04-18 16:58:57 +10:00
Arpit Jalan
3566c6f02b FIX: strip emoji string from slug 2018-04-18 11:32:32 +05:30
Neil Lalonde
b87fa6d749 FIX: blacklisted crawlers could get through by omitting the accept header 2018-04-17 12:39:30 -04:00
Régis Hanol
2585ada5ca FIX: don't allow spaces in 'reply_by_email_address' site setting 2018-04-17 17:08:12 +02:00
Sam
9980f18d86 FEATURE: track request queueing as early as possible 2018-04-17 18:06:17 +10:00
Guo Xiang Tan
64a45b0980 FIX: Missing Group#bio_raw attribute for group owners.
https://meta.discourse.org/t/group-description-does-not-load-in-editor-for-owners-who-are-not-staff/85345
2018-04-17 15:57:52 +08:00
Guo Xiang Tan
828bfd9d27 Add specs for c74c933996. 2018-04-17 10:08:39 +08:00
Robin Ward
3d7dbdedc0 FEATURE: An API to help sites build robots.txt files programatically
This is mainly useful for subfolder sites, who need to expose their
robots.txt contents to a parent site.
2018-04-16 15:43:20 -04:00
Joffrey JAFFEUX
a4a0b8e922
fix spec 2018-04-16 13:40:44 +02:00
Joffrey JAFFEUX
06b6c805d5
dashboard next: adds report for user types 2018-04-16 13:03:43 +02:00
Maja Komel
3d99726981 FIX: set notification level when changing post owner (#5616)
FIX: do not notify last post editor if they mention themself
2018-04-16 11:48:06 +02:00
Arpit Jalan
a1ef455c78 SECURITY: do not show private topic title on /unsubscribed page 2018-04-16 10:35:57 +05:30
Arpit Jalan
0183656631 FIX: verify filtered tags when checking for category minimum required tags 2018-04-14 23:20:43 +05:30
Neil Lalonde
06022d042c fix failing spec user_profile_spec 2018-04-13 10:32:28 -04:00
Sam
3632b8d8d6 FEATURE: provide extra signal about content age to crawlers
Adds Last-Modified field to help teach crawlers not to crawl old content
2018-04-13 14:58:33 +10:00
Arpit Jalan
00f59f648d
Merge pull request #5755 from techAPJ/flag-webhook
FEATURE:  webhook for flag events
2018-04-13 07:50:21 +05:30
Arpit Jalan
a16b616861 FEATURE: webhook for flag events 2018-04-13 07:47:58 +05:30
Régis Hanol
a0a06492d8 FIX: make get_hostname more lenient to user input 2018-04-12 17:09:09 +02:00
Gerhard Schlager
f042a9529b FIX: users shouldn't get notifications about mentions from system users
(unless the mentioned users are participants in a PM with the system user)
2018-04-12 16:19:44 +02:00
Régis Hanol
df7970a6f6 prefix the robots.txt rules with the directory when using subfolder 2018-04-11 22:05:02 +02:00
Régis Hanol
3c8b43bb01 FIX: non-oneboxed links on separate lines should stay on separate lines 2018-04-11 21:33:45 +02:00
Sam
bf2955cd98 stablize spec 2018-04-11 15:45:27 +10:00
Arpit Jalan
48d43b33cc add client side validation for category minimum_required_tags 2018-04-11 07:17:52 +05:30
Arpit Jalan
9ca6ebe8fe FEATURE: enforce tagging on categories 2018-04-11 07:15:24 +05:30
Joffrey JAFFEUX
45f657336e
FEATURE: adds support for loading existing core asset in pretty text 2018-04-10 08:37:16 +02:00
Guo Xiang Tan
874003b7b1 FIX: Group can't be deleted if certain users are demoted. 2018-04-10 14:19:35 +08:00
Sam
fe37ce165d correct issue where groups was never being blanked 2018-04-10 15:30:18 +10:00
Sam
71d0035a7e groups should be text to match add_group etc. 2018-04-10 13:47:07 +10:00
Sam
afaeb20f27 FEATURE: Add option to have sso synchronize group membership
In some cases add_groups and remove_groups is too much work, some sites
may wish to simply synchronize group membership based on a list.

When sso_overrides_groups is on all not automatic group membership is
sourced from SSO. Note if you omit to specify groups, they will be cleared
out.
2018-04-10 13:17:23 +10:00
Guo Xiang Tan
d9d86577ff FIX: Staff users are not affected by enable_group_directory site setting. 2018-04-10 09:22:01 +08:00
Gerhard Schlager
62aacce8f4 FEATURE: Notify flaggers when flagged post is edited by author 2018-04-09 16:45:33 +02:00
Guo Xiang Tan
c82b2dcc24 Remove admin group management pages. 2018-04-09 15:14:50 +08:00
osamasayegh
fe8301007c Add spec + make it work with .raw templates 2018-04-09 16:47:28 +10:00
Sam
4111f17f64 add missing test for rel next/prev 2018-04-09 15:01:16 +10:00
Neil Lalonde
f6cfff3cea UX: user preferences allows users to choose which title to use from their badges and groups 2018-04-06 14:34:36 -04:00
jose-hms
b87205831b FEATURE: Staged user moderation (#5721) 2018-04-06 11:41:25 +02:00
Guo Xiang Tan
0623785f69 FIX: Prevent group owners from editing admin only settings. 2018-04-06 11:44:58 +08:00
Guo Xiang Tan
eb755dd2a7 Fix the build. 2018-04-06 10:40:57 +08:00
Sam
3a7b696703 FEATURE: allow for setting crawl delay per user agent
Also moved to default crawl delay bing so no more than a req every 5 seconds is allowed

New site settings:

"slow_down_crawler_user_agents" - list of crawlers that will be slowed down
"slow_down_crawler_rate" - how many seconds to wait between requests

Not enforced server side yet
2018-04-06 10:15:23 +10:00
Gerhard Schlager
56ca87bb01 Improve spec 2018-04-05 17:27:32 +02:00
Gerhard Schlager
cd6a99a027 FEATURE: Send a different PM when a post has been hidden more than once 2018-04-05 14:03:21 +02:00
Gerhard Schlager
f2d00e5eff FEATURE: Use Message-ID for detecting email replies to group
Ignores the site setting "find_related_post_with_key" and always tries to honor the `In-Reply-To` and `References` header for emails sent to a group.

The senders email address must be included in the `To` or `CC` header of a previous email sent to the group and the `Message-ID` of that email must be included in the current email's `In-Reply-To` or `References` header.
2018-04-05 11:00:38 +02:00
Guo Xiang Tan
e36e9de28a Allow admin to view logs of automatic groups. 2018-04-05 16:31:55 +08:00
Sam
f8637ed616 FIX: if a message is *partially* archived consider it not archived 2018-04-05 17:17:47 +10:00
Guo Xiang Tan
8760c4d68c Fix GroupsController#group_params to allow more group attributes to be updated. 2018-04-05 13:53:00 +08:00
Arpit Jalan
10759677db FIX: when uploading image newuser restrictions should not apply to staff 2018-04-05 09:51:03 +05:30
Vinoth Kannan
434cbc649f FEATURE: Webhook for tag events 2018-04-04 17:49:20 +05:30
Arpit Jalan
b49f2bf7d9 fix false spec 2018-04-04 12:20:50 +05:30
Arpit Jalan
c36e201eb3 FIX: update categories topic_count when converting topic to a PM and vice versa 2018-04-04 12:01:56 +05:30
Robin Ward
d690ae0281 FIX: Broken specs too. Quotes are fragile! 2018-04-02 14:23:10 -04:00
Guo Xiang Tan
221503cd10 FIX: Add server side uniqueness validations for Group#name and User#username.
https://meta.discourse.org/t/groups-can-be-given-same-name-as-existing-username/74010
2018-04-02 18:19:18 +08:00
Guo Xiang Tan
142571bba0 Remove use of rescue nil.
* `rescue nil` is a really bad pattern to use in our code base.
  We should rescue errors that we expect the code to throw and
  not rescue everything because we're unsure of what errors the
  code would throw. This would reduce the amount of pain we face
  when debugging why something isn't working as expexted. I've
  been bitten countless of times by errors being swallowed as a
  result during debugging sessions.
2018-04-02 13:52:51 +08:00
Vinoth Kannan
efb19dbdaf
Merge pull request #5705 from discourse/new_webhooks
FEATURE: Webhook for group and category events
2018-04-02 10:53:21 +05:30
Blake Erickson
31ce955487 Add destroy rake task
Adds several rake tasks to delete users, topics, pm's and site stats so
that you can have a fresh site but maintain site settings and category
structure.
2018-03-30 18:32:21 -06:00
Neil Lalonde
73c1d3e7fe FIX: tag notification preferences were being cleared when other preferences were changed 2018-03-29 15:08:32 -04:00
Guo Xiang Tan
52e75eaee9 UX: Tweaks to group pages. 2018-03-29 17:04:48 +08:00
Robin Ward
31d0998506 FIX: Don't allow links with no href 2018-03-28 12:32:16 -04:00
Vinoth Kannan
dc33f2d071 Add new web hook serializers 2018-03-28 17:40:29 +05:30
Guo Xiang Tan
ee69d58a59 FIX: Tests could get stucked in infinite loop if it fails to resolve IP of a hostname. 2018-03-28 14:49:05 +08:00
Guo Xiang Tan
5f4ff4a8c0 Fix failing spec. 2018-03-28 12:01:50 +08:00