Commit Graph

1122 Commits

Author SHA1 Message Date
Robin Ward 5f91919663 Email support for watching first post 2016-07-07 12:23:19 -04:00
Robin Ward 3fe4903e63 FIX: Support unicode replacements with multiple codepoints 2016-07-05 13:55:41 -04:00
Guo Xiang Tan e4a82cdd85 Merge pull request #4306 from tgxworld/add_discourse_event_trigger_when_user_logs_out
FEATURE: Add event trigger when a user is logged out.
2016-07-05 19:50:46 +08:00
Régis Hanol 59680af329 disable email white/blacklisting for staged users 2016-07-04 16:05:01 +02:00
Guo Xiang Tan 22ade1f811
FEATURE: Add event trigger when a user is logged out. 2016-07-04 17:20:30 +08:00
Guo Xiang Tan 20359788dc
Rename `SiteSetting#use_https` to `force_https`. 2016-06-29 15:02:43 +08:00
Robin Ward 61ce5c210c FIX: S3Cdn link clicks weren't working 2016-06-28 15:52:38 -04:00
Sam 1411eedad3 FEATURE: offer to unwatch categories when unwatching category 2016-06-28 18:34:20 +10:00
Robin Ward 94a4af6af7 FIX: If posts are deleted they should be updated in consistency jobs 2016-06-21 13:05:56 -04:00
Régis Hanol 874c18cbc1 FIX: unstage users when using SSO 2016-06-21 11:28:58 +02:00
Neil Lalonde 487c20959c FEATURE: max topics/replies per day for new users now starts counting from the first post, not signup date 2016-06-20 16:55:11 -04:00
Guo Xiang Tan b3a8f7d369 Merge pull request #4277 from tgxworld/fix_bug_when_post_creator_returns_nil
Fix bug when post creator returns nil
2016-06-20 18:15:52 +08:00
Guo Xiang Tan 9a0797204a
FIX: Add check to ensure post has been created. 2016-06-20 15:51:26 +08:00
Sam 8866169879 FEATURE: can invite/revoke groups on private messages 2016-06-20 16:29:27 +10:00
Sam 852860de66 FEATURE: simpler and friendlier unsubscribe workflow
- All unsubscribes go to the exact same page
- You may unsubscribe from watching a category on that page
- You no longer need to be logged in to unsubscribe from a topic
- Simplified footer on emails
2016-06-17 11:28:49 +10:00
Robin Ward 84f0e5ad4d SECURITY: Unapproved, active users should not receive emails 2016-06-16 12:55:47 -04:00
Guo Xiang Tan bf64280661
FIX: Incorrect scope when checking for existing topic link. 2016-06-15 14:13:30 +08:00
Régis Hanol 470da6205c FIX: staged users should not watch/track/mute categories by default 2016-06-14 16:45:47 +02:00
Guo Xiang Tan 95efdce74f
Improve spec. 2016-06-13 13:16:24 +08:00
Guo Xiang Tan 1fe499e893
FIX: Don't include reflections when checking for duplication topic links. 2016-06-13 13:14:35 +08:00
Sam 65f466cf8c FIX: topic link reflections deleted on second save 2016-06-10 17:25:59 +10:00
Robin Ward c3ad0f447a FIX: Broken spec 2016-06-09 14:31:32 -04:00
Guo Xiang Tan ff577405ae
FIX: Randomly failing TopicList specs. 2016-06-09 22:03:13 +08:00
Robin Ward e38f17524b FIX: Reflected links weren't being cleaned up properly 2016-06-08 16:09:01 -04:00
Robin Ward 2169b1ecbc FIX: Duplicate link message should link to the post 2016-06-08 12:35:11 -04:00
Robin Ward 431179dd25 FEATURE: Prompt users when they are entering duplicate links 2016-06-07 14:47:22 -04:00
Guo Xiang Tan cb5be1fe8f
Upgrade rspec to 3.4.0. 2016-05-30 11:38:38 +08:00
Sam efc45aa704 correct specs 2016-05-27 12:35:22 +10:00
Neil Lalonde f13470b96b Use db schema for tags instead of plugin store and custom fields 2016-05-26 14:29:48 -04:00
Neil Lalonde a4cd068481 FEATURE: add caps to trust level 3 requirements for posts read and topics viewed, configurable in settings 2016-05-25 14:55:49 -04:00
Sam a19e43fd3b enough with the malloc limit, not needed 2016-05-25 21:09:07 +10:00
James Kiesel feffe23cc5 FEATURE: More granular mailing list mode (#4068)
* Rearrange frontend to account for mailing list mode

* Allow update of user preference for mailing list frequency

* Add mailing list frequency estimate

* Simplify frequency estimate; disable activity summary for mailing list mode

* Remove combined updates

* Add specs for enqueue mailing list mode job

* Write mailing list method for mailer

* Fix linting error

* Account for stale topics

* Add translations for default mailing list setting

* One query for mailing list topics

* Fix failing spec

* WIP

* Flesh out html template

* First pass at text-based mailing list summary

* Add user avatar

* Properly format posts for mailing list

* Move make_all_links_absolute into Email::Styles

* Apply first_seen_at to user

* Send mailing list email summary hourly based on first_seen_at

* Branch and test cleanup

* Use existing mailing list mode estimate

* Fix failing specs
2016-05-21 15:17:54 +02:00
Sam b04ab83f12 FIX: refresh automatic group if SSO specifies admin/mod 2016-05-17 17:31:34 +10:00
Guo Xiang Tan 96f07053b2
FIX: Ensure unique fields in `TopicList.preloaded_custom_fields`. 2016-05-16 17:56:00 +08:00
Régis Hanol 6137bb46d3 FIX: a User is *not* a Topic 2016-05-14 10:06:29 +02:00
Arpit Jalan 82daf93eb3 Merge pull request #4206 from techAPJ/convert-topic
FEATURE: move a topic from PM to regular topic or vice versa
2016-05-04 01:33:15 +05:30
Régis Hanol df14926e42 SECURITY: check magic bytes before using ImageMagick tools 2016-05-03 21:54:07 +02:00
Arpit Jalan acfb540952 FEATURE: move a topic from PM to regular topic or vice versa 2016-05-02 21:34:05 +05:30
Arpit Jalan 7151c16c79 FEATURE: create permalink when category slug is changed 2016-04-27 17:34:03 +05:30
Arpit Jalan 74b3807f60 FEATURE: new bootstrap mode settings for brand new Discourse community (#4193)
* FEATURE: new bootstrap mode settings for brand new Discourse community

* new SiteSetting.set_and_log method
2016-04-26 13:08:19 -04:00
shaktikatare1989 d1f61015c0 Fix: Editing a topic with an invalid title will still push it to the top (#4185)
* fix: Editing a topic with an invalid title will still push it to the top
* add specs to check topic not bumped with invalid title
2016-04-25 10:33:38 +02:00
Sam 0119a2f980 FIX: only ever send users 1 email per post
in the past ninja editing a post to add a mention could trigger duplicate
emails to a user (and a few other edge cases)
2016-04-15 15:59:01 +10:00
Robin Ward 0396b14b70
FEATURE: New "First Onebox" badge 2016-04-12 15:31:14 -04:00
Arpit Jalan 50fce0998f FEATURE: allow moderators to see offical warnings 2016-04-11 18:44:19 +05:30
Robin Ward cc25716e47 FIX: Allow message format translations to be overridden 2016-04-08 14:49:50 -04:00
Robin Ward adb3810f67
FIX: Allow longer TLDs 2016-04-08 12:15:21 -04:00
Robin Ward 5059ee04b9 Remove `UserFirst` table and grant Emoji badge directly 2016-04-07 12:31:41 -04:00
Sam a130cb8305 FEATURE: move more urgent emails notifications to critical queue
Move signup, admin login and password change email notifications
to critical queue
2016-04-07 14:39:01 +10:00
Robin Ward 5866f0df18 Remove UserFirst for mention since it can be retrieved elsewhere 2016-04-06 14:01:37 -04:00
Robin Ward 189d70661e FIX: Don't count emojis within quotes 2016-04-06 12:02:35 -04:00
Robin Ward ba80ae73be FIX: Broken spec 2016-04-05 16:39:20 -04:00
Robin Ward 64a1a44c4b FIX: Don't create user first records on private posts 2016-04-05 16:13:10 -04:00
Robin Ward c30d327b77 FEATURE: Two new badges - First Emoji and First Mention 2016-04-05 15:17:41 -04:00
Neil Lalonde 56e47c8d7e FEATURE: report on admin dashboard when favicon is failing to load 2016-04-05 14:42:32 -04:00
Régis Hanol f382897952 FIX: don't extract link with 'mailto' scheme 2016-04-05 00:43:11 +02:00
Arpit Jalan 6f0137dec9 FEATURE: disable post editing when the post has active flag 2016-03-30 23:28:49 +05:30
Sam aae835a42f FIX: all badges got revoked due to ensure consistency query 2016-03-29 23:54:18 +11:00
Sam 418bc4a844 FIX: when ensuring consistency also delete orphan badges 2016-03-29 16:41:03 +11:00
Sam fe51f84aa7 FEATURE: allow admins to enter badge long descriptions
FIX: fallback to description if badge long description is missing

Also moves all badge localization into server.en, this slims the client down

serializers pass down localized names/descriptions/long descriptions
2016-03-28 18:38:57 +11:00
Arpit Jalan 64feffbb60 FEATURE: site setting for suppressing categories from digest email 2016-03-26 01:06:03 +05:30
Sam c095304d6d FEATURE: limit daily emails per user to 100 per day via site setting
- controlled via max_emails_per_day_per_user, 0 to disable
- when limit is reached user is warned
2016-03-23 15:08:48 +11:00
Sam d09a20210b correct bad spec 2016-03-22 14:50:12 +11:00
Robin Ward b4f306ce03 FEATURE: Site Customizations can use the plugin api 2016-03-18 14:41:48 -04:00
Robin Ward 5d4ee2ca1d FEATURE: Warn a user when they have few likes remaining 2016-03-18 11:30:29 -04:00
Robin Ward 1fba835d4f FIX: Use a logging table for daily likes given. Use it for badges. 2016-03-18 11:18:54 -04:00
Neil Lalonde 213950e4cf FEATURE: add option to include topics from trust level 0 users in digest emails 2016-03-17 17:35:23 -04:00
Sam Saffron 433fa74d87 FIX: ensure consistency of user options
Edge case during upgrade can cause accounts registered after migration
prior to restart to have missing user option records
2016-03-17 10:03:56 +11:00
Arpit Jalan ff12b5bf57 FIX: newly created categories were not showing up 2016-03-14 23:17:02 +05:30
Robin Ward 1006b1ba94 Various Plugin Enhancements and Extension Points 2016-03-11 15:53:37 -05:00
Sam aa001fcfc4 Merge pull request #4057 from joebuhlig/spec-for-topic-status-update-event
Add spec for topic_status_update event
2016-03-10 16:46:59 +11:00
Guo Xiang Tan ee8be3d1a8 Merge pull request #4059 from gdpelican/feature/disable-mailing-list-mode
FEATURE: Add site setting for disabling mailing list mode site wide
2016-03-08 16:27:09 +08:00
James Kiesel 2f00e2179f Don't use unnecessary stubs; site setting language update 2016-03-08 19:40:16 +13:00
Joe Buhlig 186a9630b7 Added spec for topic status update event 2016-03-07 10:40:06 -06:00
Sam 3e018c2588 FIX: rate limit do/undo on post actions 2016-03-06 09:51:30 +11:00
James Kiesel 54b4fb69db FEATURE: Add site setting for disabling mailing list mode site wide 2016-03-05 11:08:31 +13:00
Sam Saffron 8b1772ac0f FIX: if user undos like, and relikes notify
FEATURE: roll up likes for notify on all likes
2016-03-04 22:56:27 +11:00
Neil Lalonde c1aea91d63 FEATURE: More digest email frequency options. Digests can be sent as often as every 30 minutes. 2016-03-02 15:43:47 -05:00
Sam Saffron c15c483931 PERF: stop rebuilding full directory item table on refresh 2016-03-02 18:23:29 +11:00
Robert Riemann 9c39647cd2 fix: support for hyphens in group name
The group mention @ORG-team triggers notifications for the group @ORG. This fix changes the RegExp, so that the group name is correctly extracted.

see: https://meta.discourse.org/t/group-mentions-that-begin-with-the-same-characters-may-be-incorrect/39892/12?u=rriemann
2016-02-23 23:55:31 +01:00
Neil Lalonde cab5dd09d3 FIX: broken links on admin dashboard in Top Referrers section 2016-02-22 14:31:13 -05:00
Régis Hanol 4d981cec53 FIX: don't try to optimize large PNGs (takes too much time) 2016-02-22 12:57:24 +01:00
Sam f18f6dc31f correct spec to stop checking for empty category suppression 2016-02-19 17:43:26 +11:00
Sam f0e942f647 PERF: move 3 more option columns out of the user table 2016-02-18 16:57:22 +11:00
Sam 3829c78526 PERF: shift most user options out of the user table
As it stands we load up user records quite frequently on the topic pages,
this in turn pulls all the columns for the users being selected, just to
discard them after they are loaded

New structure keeps all options in a discrete table, this is better organised
and allows us to easily add more column without worrying about bloating the
user table
2016-02-17 18:08:25 +11:00
Régis Hanol 63b9d1c645 FIX: sends an email notifcation when a user's post is linked 2016-02-16 18:29:23 +01:00
Sam Saffron 8e9a8472f4 FEATURE: don't move muted messages back into inbox 2016-02-15 10:56:39 +11:00
Arpit Jalan 8a7868be07 FIX: validate user website 2016-02-06 02:19:48 +05:30
Régis Hanol 2d170712d7 new 'private_email_time_window_seconds' site setting 2016-02-04 17:22:16 +01:00
Régis Hanol 12051f79a8 FIX: don't send empty email notifications for small_actions 2016-02-01 19:12:10 +01:00
Régis Hanol ce8c2d34d7 FIX: add a 20 seconds grace period before sending a notification about a PM 2016-02-01 10:14:30 +01:00
Robin Ward 617dc42cd9 Merge pull request #3975 from techAPJ/category-user
FIX: changing topic from one watched category to another watched category makes topic 'new' again
2016-01-28 10:53:29 -05:00
Sam Saffron b25e505fb7 SECURITY: user summary could show topic links you have no permissions to 2016-01-28 11:12:12 +11:00
Sam Saffron a764cc3a42 FEATURE: by default users track a group (as opposed to watch)
FEATURE: a rollup counting number of messages in the group inbox to tracking users
2016-01-27 21:38:33 +11:00
Sam 1bb485fca5 FIX: when a user got multiple replies to a topic, emails were missing 2016-01-27 12:20:08 +11:00
Arpit Jalan d0719aed24 FIX: changing topic from one watched category to another watched category makes topic 'new' again 2016-01-26 01:28:01 +05:30
Arpit Jalan 1cee914565 FEATURE: make top criteria formula multipliers controlled by site
setting
2016-01-21 10:30:06 +05:30
Sam Saffron 7303f8f309 FEATURE: first pass at user summary page 2016-01-20 15:14:25 +11:00
Régis Hanol 522e0dc9ca Merge pull request #3964 from keepcosmos/add-s3-region
Add new s3 region
2016-01-19 09:16:48 +01:00
Sam 665fc44741 FIX: message_archived? not set correctly for groups 2016-01-19 18:35:46 +11:00
Régis Hanol 61cc776fdd FIX: only send email notifications for regular and whisper type of posts 2016-01-19 01:39:57 +01:00
keepcosmos c53b4ae66d add s3 region 2016-01-18 22:50:15 +09:00
Régis Hanol 96aa5b865f FIX: mentions regex server-side (ie. don't count email addresses) 2016-01-12 09:53:09 +01:00
Robin Ward 2a84db73b5 Support IP addresses for embeddable hosts 2016-01-11 11:06:32 -05:00
Régis Hanol 98c0fac461 FEATURE: add small action post when adding/removing users in messages 2016-01-11 12:42:06 +01:00
Arpit Jalan 97e4f7f6d3 Enums that are used in tables need to be stable 2016-01-08 20:43:11 +05:30
Guo Xiang Tan c1dbf5c1c4 FEATURE: Autolinking to category using hashtags. 2016-01-05 00:12:24 +08:00
Neil Lalonde 007326d3bd FIX: hidden posts that are edited by the author and unhidden could not be flagged by the same users again 2015-12-29 16:59:36 -05:00
Neil Lalonde 98eee2b5de FEATURE: when all posts in a topic are moved, close the topic 2015-12-29 16:01:55 -05:00
Neil Lalonde c3e81dba68 FIX: setting tl3_min_likes_received too high can make it impossible to be promoted to tl3. Cap the min number of days over which those likes must be received. 2015-12-29 12:59:59 -05:00
Arpit Jalan f40249faad FEATURE: make trust level 3 time period admin setting 2015-12-22 23:26:19 +05:30
Guo Xiang Tan cca0896b9e FIX: Update all does not trigger callbacks. 2015-12-17 00:07:04 +08:00
Arpit Jalan e52852dd0f FIX: Autoclose message was not correct when immediate
FEATURE: Warn when setting auto-close for right now
2015-12-08 18:16:48 +05:30
Régis Hanol 578f606a1a add 'incoming_email' to groups 2015-12-07 12:39:28 +01:00
Andy Waite 3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Sam ad3dd161e7 FEATURE: first class group mentions built in
If you allow a group to be mentioned it can be mentioned with the @ symbol.

Keep in mind as a safety mechanism max_users_notified_per_group_mention is set to 100
2015-11-30 17:08:43 +11:00
Régis Hanol 914b854d92 send invite & message notification emails immediately 2015-11-27 19:09:35 +01:00
Robin Ward 5e93140f85 FEATURE: Can override any translation via an admin interface 2015-11-27 11:35:19 -05:00
Arpit Jalan 6354324f2f FIX: validate automatic membership email domains 2015-11-27 12:35:33 +05:30
Sam 43d63367fd PERF: stop loading handlebars and ember compilers in prod
(this removes a nice 50K from our initial payload and saves memory)

Also fixes invalid HTML automatically if added to HEAD or /BODY
2015-11-27 11:59:01 +11:00
Régis Hanol 0d54c18c8b new hidden 'allow_staged_accounts' setting 2015-11-26 18:31:23 +01:00
Robin Ward d65ec1af2e Rename `ninja_edit_window` to `editing_grace_period` :'( 2015-11-24 14:28:42 -05:00
Sam 88f1a8f0b1 Merge pull request #3821 from mpalmer/letter-avatar-proxy
Proxy letter avatars by default
2015-11-19 20:02:16 +11:00
Régis Hanol 85580cd243 fix user_search spec 2015-11-18 21:08:50 +01:00
Régis Hanol ff10eb32a6 don't return staged users in mentions 2015-11-18 20:57:49 +01:00
Régis Hanol 92ba6125c4 FEATURE: new 'automatically_unpin_topics' user preference 2015-11-17 18:21:40 +01:00
Sam Saffron 448a1413d3 left over specs 2015-11-10 00:56:57 +11:00
Sam Saffron 6dd4bc7d57 FEATURE: support group owner, capable of controlling group membership
Group owners are regular users that can add or remove users to a group
The Admin UX allows admins to appoint group owners
The public group UX will display group owners first and unlock UI to
add and remove members

Group owners can only be appointed on non automatic groups
Group owners may not appoint another group owner
2015-11-10 00:56:57 +11:00
Sam Saffron ffa523a543 FIX: when moving posts, retain creator and date from OP 2015-11-07 15:17:47 +11:00
Matt Palmer c09f345cff Proxy letter avatars by default
On sites that don't otherwise configure an avatar fallback, Discourse will
now tell the client to get its letter avatars from a location which nginx
proxies to the centralised `avatars.discourse.org` service.  This alleviates
privacy concerns, whilst still providing some degree of performance benefit
(no need for every site to delay avatar response by 300ms for image
rendering).

It is still possible to gain the benefits of global image caching and the
lower latency of requesting directly from a CDN, by explicitly changing the
`external_system_avatars_url` site setting to
`https://avatars.discourse.org/letter/{first_letter}/{color}/{size}.png`.
2015-11-06 14:13:44 +11:00
kerryliu b7803fc68e FIX: allow emoji class when crawling embedded content, add rspc-html-matchers 2015-11-05 18:51:26 -08:00
James Kiesel 2fc52e26a6 Optimize all_allowed_users query 2015-10-29 19:39:30 +02:00
Arpit Jalan a439500bac FIX: do not mark post as spam if the previous flag was disagreed 2015-10-17 01:30:53 +05:30
Régis Hanol de344bcd7e Merge pull request #3854 from tgxworld/fix_transactional_race_condition
FIX: Race condition when wrapping `PostCreator#create` in a transaction.
2015-10-15 11:07:20 +02:00
Guo Xiang Tan 600e42c2ba FIX: Race condition when wrapping `PostCreator#create` in a transaction. 2015-10-15 14:42:40 +08:00
Arpit Jalan b60bceba36 fix the build 2015-10-14 19:20:30 +05:30
Sam 6f43b575a8 FEATURE: no need to cap new and unread together anymore
- leave unread alone
- cap new at 500 per site, with a site setting
2015-10-01 17:17:15 +10:00
Sam 6c37b26b24 Correct site spec 2015-09-28 16:50:24 +10:00
Robin Ward 43c7320f55 FIX: Allow really long links to work 2015-09-25 14:07:20 -04:00
Sam ffb8cb8cac FEATURE: remove dependency of Redcarpet
PERF: cache fancy_title in topics table

New pure ruby implementation is far more flexible and easier to amend.
2015-09-24 13:37:53 +10:00
Neil Lalonde 5ca26a7707 FEATURE: add site setting use_admin_ip_whitelist to enable/disable the whitelisting of admins by IP address 2015-09-23 12:15:08 -04:00
Régis Hanol 36309e50cc Merge pull request #3767 from tgxworld/track_user_profile_views
Track user profile views
2015-09-23 11:38:18 +02:00
Régis Hanol 1aad58b642 Merge pull request #3781 from tgxworld/feature_log_category_settings
Feature log category settings
2015-09-23 11:34:08 +02:00
Sam 3853e3cfdc PERF: omit 2 queries on every full page load 2015-09-23 16:47:17 +10:00
Sam 613761d1cd FEATURE: upgrade to Rails 4.2.4 2015-09-23 15:24:30 +10:00
Régis Hanol 4f7140fb32 FIX: properly filter whispers in user stream 2015-09-22 00:50:52 +02:00
Neil Lalonde 2ae032c9b0 FIX: categories page would sometimes show no topics, even if there are some visible topics to show 2015-09-21 18:13:14 -04:00
Régis Hanol fe656fb04d FIX: select appropriate period when redirecting to top 2015-09-21 20:28:20 +02:00
Guo Xiang Tan f39b9124b6 FEATURE: Log staff actions for Category changes. 2015-09-18 10:53:08 +08:00
Guo Xiang Tan 7acc93b2a0 FEATURE: Track user profile views. 2015-09-16 14:48:31 +08:00
Sam 83efde79f0 specs to account for new default letter avatar location 2015-09-15 13:25:15 +10:00