Commit Graph

3726 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
7f2f3b8b22
FIX: improves reports resilience (#6239)
This commit makes most of the reports now lazy loaded, and making them benefits from graceful failures.
2018-08-06 16:57:40 -04:00
David Taylor
812add18bd REFACTOR: Serve auth provider information in the site serializer.
At the moment core providers are hard-coded in Javascript, and plugin providers get added to the JS payload at compile time. This refactor means that we only ship enabled providers to the client.
2018-08-06 09:25:48 +01:00
Guo Xiang Tan
4e11811321 FIX: UserAvatar#update_gravatar! does not update User#uploaded_avatar.
https://meta.discourse.org/t/missing-user-profile-pictures/93844/4
2018-08-06 13:29:44 +08:00
Osama Sayegh
18b396ad56 FEATURE: add link to see new commits when updates are available for themes (#6233)
* FEATURE: add link to see new commits when updates are available for themes

* shorten regexp
2018-08-06 15:29:15 +10:00
Régis Hanol
0cd9e2acb9 fix build 2018-08-04 01:56:26 +02:00
Régis Hanol
bf4d98e89d FIX: always store topic links using the upload url 2018-08-04 01:29:32 +02:00
Osama Sayegh
880462a41c FEATURE: display out of date themes on admin dashboard
* FEATURE: disaply out of date themes on admin dashboard

* Update copy
2018-08-03 09:53:48 +10:00
Joffrey JAFFEUX
9073e11943
FIX: improves number/percent support in reports 2018-08-01 18:40:59 -04:00
Penar Musaraj
4a872823e7 Improvements to user drafts (#6226)
* drafts in user profile: only show to user herself (not to admins), use avatar replying to (instead of topic OP), add keyboard shortcut for drafts, simplify display labels

* use JSON when testing Draft.stream
2018-08-02 07:41:27 +10:00
Dan Ungureanu
1a0ffc5ace FEATURE: Added method to get multiple values at once from PluginStore. (#6225) 2018-08-01 18:42:40 +02:00
Gerhard Schlager
f4ca105498 FIX: Moving posts to existing topic didn't update topic metadata 2018-08-01 18:05:43 +02:00
Joffrey JAFFEUX
0b9437cee7
FIX: more resilient/consistent dashboard caching (#6223) 2018-08-01 09:45:50 -04:00
Joffrey JAFFEUX
7c7dfa4e5e
FIX: wraps any query with the slow query guard (#6222) 2018-08-01 07:39:57 -04:00
Penar Musaraj
1f45215537 FEATURE: Drafts view in user profile
* add drafts.json endpoint, user profile tab with drafts stream

* improve drafts stream display in user profile

* truncate excerpts in drafts list, better handling for resume draft action

* improve draft stream SQL query, add rspec tests

* if composer is open, quietly close it when user opens another draft from drafts stream; load PM draft only when user is in /u/username/messages (instead of /u/username)

* cleanup

* linting fixes

* apply prettier styling to modified files

* add client tests for drafts, includes a fixture for drafts.json

* improvements to code following review

* refresh drafts route when user deletes a draft open in the composer while being in the drafts route; minor prettier scss fix

* added more spec tests, deleted an acceptance test for removing drafts that was too finicky, formatting and code style fixes, added appEvent for draft:destroyed

* prettier, eslint fixes

* use "username_lower" from users table, added error handling for rejected promises

* adds guardian spec for can_see_drafts, adds improvements following code review

* move DraftsController spec to its own file

* fix failing drafts qunit test, use getOwner instead of deprecated this.container

* limit test fixture for draft.json testing to new_topic request only
2018-08-01 16:34:54 +10:00
Joffrey JAFFEUX
5febe71baa
FIX: prevents crash if flagger doesn’t exist (#6219) 2018-07-31 23:48:54 -04:00
Joffrey JAFFEUX
849f0d00f6
FEATURE: adds revision_count to moderators_activity (#6218)
Co-Authored-By: Simon Cossar <scossar@users.noreply.github.com>
2018-07-31 23:40:45 -04:00
Guo Xiang Tan
919e8db686 FIX: Check for group name availability should skip reserved usernames. 2018-08-01 11:09:33 +08:00
Joffrey JAFFEUX
2b2a506a7b
FIX: makes dashboard more resilient to errors (#6217)
This commit is an attempt to limit cases where the dashboard will generate a full exception page and also make it easier to track the error.
2018-07-31 21:23:28 -04:00
Joffrey JAFFEUX
37252c1a5e
UI: improves dashboard table reports
- support for avatars
- support for topic/post/user type in reports
- improved totals row UI
- minor css tweaks
2018-07-31 17:35:13 -04:00
Neil Lalonde
fd29ecb91a UX: include a flag reason in the post-deleted-by-staff-because-of-flags message 2018-07-30 16:45:46 -04:00
Guo Xiang Tan
87537b679c Drop reply_key, skipped and skipped_reason from email_logs. 2018-07-30 11:39:28 +08:00
Guo Xiang Tan
b94633e844 FIX: FileHelper should prioritize response content-type.
Request to a URL with `.png` extension may return a jpg
instead causing us to attach the wrong extension to an
upload.
2018-07-30 10:54:36 +08:00
Guo Xiang Tan
6f9a91cbd5
Merge pull request #6175 from vinothkannans/post_approval_webhook
FEATURE: Webhook for post approval events
2018-07-27 10:50:49 +08:00
Vinoth Kannan
af5b88f8e2 Rename approval web hook event type to queued post 2018-07-26 10:29:38 +05:30
Guo Xiang Tan
f8b367cc9c Fix the build. 2018-07-26 10:17:51 +08:00
Guo Xiang Tan
30242972d3 Add spec for 4bf3bf6786. 2018-07-26 09:16:14 +08:00
Régis Hanol
f94aeaf6cf SECURITY: force IM decoder based on file extension - part 3 2018-07-25 23:55:06 +02:00
Régis Hanol
800c57c6ab SECURITY: force IM decoder based on file extension - part 2 2018-07-25 23:08:02 +02:00
Régis Hanol
4bf3bf6786 SECURITY: force IM decoder based on file extension 2018-07-25 22:00:04 +02:00
Kris
3fd2571abc Fix typo in color scheme 2018-07-25 15:12:01 -04:00
Vinoth Kannan
5059dad8f0 FEATURE: Webhook for post approval events 2018-07-25 23:43:19 +05:30
David Taylor
0d0d78841b
FIX: Remove plugin.enabled? checks at initialization time (#6166)
Checking `plugin.enabled?` while initializing plugins causes issues in two ways:
  - An application restart is required for changes to take effect. A load-balanced multi-server environment could behave very weirdly if containers restart at different times.
  - In a multisite environment, it takes the `enabled?` setting from the default site. Changes on that site affect all other sites in the cluster.

Instead, `plugin.enabled?` should be checked at runtime, in the context of a request. This commit removes `plugin.enabled?` from many `instance.rb` methods.

I have added a working `plugin.enabled?` implementation for methods that actually affect security/functionality:
  - `post_custom_fields_whitelist`
  - `whitelist_staff_user_custom_field`
  - `add_permitted_post_create_param`
2018-07-25 16:44:09 +01:00
Joffrey JAFFEUX
578c8e861b
FIX: refreshes disk_space on backup create/destroy (#6169) 2018-07-25 08:26:30 -04:00
Joffrey JAFFEUX
7a3c541077
UX: Preview multiple color schemes in wizard (#6151)
It was a dropdown to provide choices of color schemes,
and only one scheme could be shown.
With this commit, multiple color scheme previews can be displayed on
one page at the same time, making admins choose color schemes more
easily.

Theme preview windows are shrinked.

Imported default color schemes.

Co-Authored-By: Misaka 0x4e21 <misaka4e21@gmail.com>
2018-07-24 09:00:20 -04:00
Guo Xiang Tan
fa19d3a53c
Merge pull request #6108 from discourse/transaction-sidekiq-fix
Fix notifications for topics moved between categories
2018-07-24 17:44:03 +08:00
David Taylor
20a21b1240 Move into MiniSQLMultisiteConnection, and add test for rollback 2018-07-24 09:41:55 +01:00
Guo Xiang Tan
98f84d1a4e Update annotations. 2018-07-24 15:49:55 +08:00
Guo Xiang Tan
7a2bf8e368 Fix invalid query syntax when CategoryCustomField#value is blank. 2018-07-24 14:48:27 +08:00
Guo Xiang Tan
fad9c2b971 PERF: Move EmailLog#reply_key into new post_reply_keys table. 2018-07-24 13:51:53 +08:00
Guo Xiang Tan
ae8b0a517f PERF: Split skipped email logs into a seperate table. 2018-07-24 13:14:37 +08:00
Guo Xiang Tan
9b84e78fdf Update annotations. 2018-07-24 11:14:19 +08:00
David Taylor
eda1462b3b
FEATURE: List, revoke and reconnect associated accounts. Phase 1 (#6099)
Listing connections is supported for all built-in auth providers. Revoke and reconnect is currently only implemented for Facebook.
2018-07-23 16:51:57 +01:00
Joffrey JAFFEUX
32062864d3
FIX: removes system from user to user report (#6144) 2018-07-23 10:33:12 -04:00
Vinoth Kannan
84ab825e41
FEATURE: Webhook for user destroyed event (#6124) 2018-07-23 13:19:49 +05:30
Guo Xiang Tan
5c1bd38d84
Merge pull request #6131 from jjaffeux/lazy-load-reports
FIX: lazy load more reports in dashboard
2018-07-21 17:24:17 +08:00
Simon Cossar
d705f859db Exclude System user from post_edits report (#6130) 2018-07-21 11:17:25 +02:00
Joffrey JAFFEUX
1d5096eb46 FIX: lazy load more reports in dashboard 2018-07-20 23:35:53 -04:00
Guo Xiang Tan
7cf6c2825e
Merge pull request #6106 from OsamaSayegh/watch-when-splitting
FIX: topic owner should watch the new topic when moving posts to a new topic
2018-07-20 15:18:59 +08:00
OsamaSayegh
69450750d1 shorter method name and better specs 2018-07-20 10:13:27 +03:00
Joffrey JAFFEUX
64f0cf425b
FIX: removes uncessary reports loading (#6119) 2018-07-19 19:30:13 -04:00
Joffrey JAFFEUX
a0793387cf
FEATURE: differentiates pms in moderators activity report (#6117)
Co-Authored-By: Simon Cossar <scossar@users.noreply.github.com>
2018-07-19 19:29:42 -04:00
Joffrey JAFFEUX
1a78e12f4e
FEATURE: part 2 of dashboard improvements
- moderation tab
- sorting/pagination
- improved third party reports support
- trending charts
- better perf
- many fixes
- refactoring
- new reports

Co-Authored-By: Simon Cossar <scossar@users.noreply.github.com>
2018-07-19 14:33:11 -04:00
Guo Xiang Tan
4765507585 Remove code that is no longer required. 2018-07-19 16:56:53 +08:00
Sam
a755ff7b35 FIX: not checking for 0 correctly
0.blank? == false
2018-07-19 07:45:26 +10:00
Maja Komel
a9ebad3f6c FIX: do not add a moderator post when post is flagged via direct message (#6100) 2018-07-18 23:18:14 +02:00
David Taylor
32db976156 FIX: Stop race condition when topic notification jobs are scheduled during a database transaction
This was not picked up by tests because scheduled jobs are run immediately
and in the current thread (and therefore the current database transaction).

This particular case sometimes occurs inside multiple nested transactions,
so simply moving the offending line outside of the transaction is not enough.

Implemented TransactionHelper, which allows us to use `TransactionHelper.after_commit`
to define code to be run after the current transaction has been committed.
2018-07-18 22:04:43 +01:00
Neil Lalonde
afc94ac9e4 FEATURE: add a Top Categories section to the user summary page, showing the categories in which a user has the most activity 2018-07-18 16:39:16 -04:00
OsamaSayegh
547b571d84 FIX: topic owner should watch the new topic when moving posts to a new topic 2018-07-18 15:23:32 +03:00
Régis Hanol
6d6e026e3c FEATURE: selectable avatars 2018-07-18 12:57:43 +02:00
Guo Xiang Tan
487ef9773f Better logging when optimizing image fails. 2018-07-18 14:11:23 +08:00
Guo Xiang Tan
b068a8a771 Fix the build. 2018-07-18 14:03:27 +08:00
Guo Xiang Tan
be71f9ff82 REFACTOR: Don't load entire AR object just to get a column. 2018-07-18 13:53:57 +08:00
Arpit Jalan
7da22e395b FIX: do not show links with 0 click on topic map 2018-07-18 10:50:01 +05:30
OsamaSayegh
281538ae61 FIX: theme JS should only run when needed global objects exist (#6098) 2018-07-18 15:13:47 +10:00
Guo Xiang Tan
3874d40910 Prepare to drop EmailLog#topic_id. 2018-07-18 10:22:24 +08:00
Sam
5adf5b527d FEATURE: support filter_auto_bump_topics event
Use this event to filter the list of auto bumped topics.

EG:

  on(:filter_auto_bump_topics) do |_category, filters|
    filters.push(->(r) { r.where(<<~SQL)
        NOT EXISTS(
          SELECT 1 FROM topic_custom_fields
          WHERE topic_id = topics.id
          AND name = 'accepted_answer_post_id'
        )
      SQL
    })
  end
2018-07-18 10:56:09 +10:00
Sam
02628883d2 FEATURE: adjust autobump system
- We spread out bumping through the day, if you are bumping
 4 topics then a topic will be bumped every 6 hours

- We add a small, bumping action at the bottom of the post to
 denote a topic got bumped
2018-07-18 10:17:33 +10:00
Guo Xiang Tan
3553375dd2 PERF: Store EmailLog#reply_key as uuid data type. 2018-07-17 17:05:42 +08:00
Guo Xiang Tan
1d74ccaaf8 Add compatibility for ImageMagick7. 2018-07-17 15:50:58 +08:00
Guo Xiang Tan
fe230f29cd Update annotations. 2018-07-17 13:11:45 +08:00
Sam
91266cdabb correct auto bump topic logic 2018-07-17 09:33:33 +10:00
Guo Xiang Tan
c0c263405a
PERF: Store EmailLog#bounce_key as uuid data type. (#6093)
PERF: Store `EmailLog#bounce_key` as `uuid` data type.
2018-07-16 20:05:54 +08:00
Sam
ac0053f491 FEATURE: navigate to first post and auto bump category settings
### navigate_to_first_post_after_read setting for categories

When enabled on categories logged on users will return to OP after
reading the entire category. (useful for documentation categories)

### num_auto_bump_daily

Set a number of topics that will automatically bump daily on a category.

- Every 15 minutes we will check if any category has this setting
- Categories with the setting are shuffled
- We exclude pinned, closed, category description and archived topics
- Maximum of 1 topic for the list of categories is bumped till limit reached per category
- We always try to bump oldest first
- Limit is elastic using a RateLimiter that ensures that we only bump N per day

Also some minor organisation on category settings

Froze strings on category.rb
2018-07-16 18:10:35 +10:00
Guo Xiang Tan
6761f8ecbf PERF: Add missing index on user_id for user_second_factors table. 2018-07-16 14:21:07 +08:00
Guo Xiang Tan
214dac05de Update annotations. 2018-07-16 14:19:07 +08:00
Rishabh
a6c589d882 FEATURE: Add custom S3 Endpoint and DigitalOcean Spaces/Minio support for Backups (#6045)
- Add custom S3 Endpoints and DigitalOcean Spaces support
- Add Minio support using 'force_path_style' option and fix uploads to custom endpoint
2018-07-16 14:44:55 +10:00
Leo McArdle
21ebb1cd54 FEATURE: Secondary emails support. 2018-07-16 11:09:49 +08:00
Guo Xiang Tan
50e59fb9bd Fix the build. 2018-07-16 10:12:19 +08:00
Jay Pfaffman
0ed2834c2d FEATURE: Add users:disable_2factor rake task
https://meta.discourse.org/t/admin-locked-out-of-2fa/92156/2?u=pfaffman
2018-07-16 09:56:55 +08:00
Kyle Zhao
2901691e87 FEATURE: per-category approval settings (#5778)
- disallow moving topics to a category that requires topic approval
2018-07-13 12:51:08 +10:00
Arpit Jalan
db67c87916 fix purge unactivated users subquery 2018-07-13 07:58:58 +05:30
OsamaSayegh
decf1f27cf FEATURE: Groundwork for user-selectable theme components
* Phase 0 for user-selectable theme components

- Drops `key` column from the `themes` table
- Drops `theme_key` column from the `user_options` table
- Adds `theme_ids` (array of ints default []) column to the `user_options` table and migrates data from `theme_key` to the new column.
- Removes the `default_theme_key` site setting and adds `default_theme_id` instead.
- Replaces `theme_key` cookie with a new one called `theme_ids`
- no longer need Theme.settings_for_client
2018-07-12 14:18:21 +10:00
Sam
574d447254 FIX: don't attempt to bump draft sequence if no editor
Rare case on old installs
2018-07-11 17:06:49 +10:00
Guo Xiang Tan
a17f5052a3 FIX: ignored_columns was called twice. 2018-07-11 09:52:37 +08:00
OsamaSayegh
f2cc05c6c6 FIX: ignore self-quotes from the same post when saving (#6082) 2018-07-10 16:17:28 +08:00
Guo Xiang Tan
5374a0e720 Fix the build. 2018-07-10 09:48:57 +08:00
Jordan Seanor
10bc69a62f FEATURE: Event on topic merge (#6057) 2018-07-10 09:28:57 +08:00
Guo Xiang Tan
96aca6d7e6
Remove legacy vote post action code. (#6009) 2018-07-09 16:54:18 +08:00
Sam
330e848d4a FIX: if s3 set via global setting bypass config check in UI 2018-07-09 15:38:06 +10:00
michael@discoursehosting.com
81188060d6 Add S3 region eu-west-3 (Paris) 2018-07-09 14:18:35 +10:00
Andrew Schleifer
dba22bbde2 rollback changes
This reverts:
* 1baba84c438e "fix s3 subfolders harder"
* ea5e57938edf "fix test for absolute_base_url change"
2018-07-06 17:16:40 -05:00
Andrew Schleifer
52e9f49ec1 fix s3 subfolders harder
specifically, include the folder in absolute_base_url
2018-07-06 16:28:40 -05:00
Maja Komel
18f5f646b1 FEATURE: allow selecting a tag when moving posts to a new topic (#6072) 2018-07-06 18:21:32 +02:00
Guo Xiang Tan
875008522d FIX: Discourse.S3BaseUrl did not account for subfolder bucket names. 2018-07-06 15:53:57 +08:00
Guo Xiang Tan
7163bf9323 FIX: Upload.get_from_url not respective subfolder in s3 bucket names. 2018-07-06 11:37:11 +08:00
Neil Lalonde
eabc8f7fbd
Merge pull request #6023 from misaka4e21/only-staff-can-create-tag
FEATURE: Support disabling tag creation for non-staff users.
2018-07-05 11:12:44 -04:00
Patrick Gansterer
28dd7fb562 FEATURE: Create hidden posts for received spam emails (#6010)
* Add possibility to add hidden posts with PostCreator

* FEATURE: Create hidden posts for received spam emails

Spamchecker usually have 3 results: HAM, SPAM and PROBABLY_SPAM
SPAM gets usually directly rejected and needs no further handling.
HAM is good message and usually gets passed unmodified.
PROBABLY_SPAM gets an additional header to allow further processing.
This change addes processing capabilities for such headers and marks
new posts created as hidden when received via email.
2018-07-05 11:07:46 +02:00
Sam
7b26f5086b PERF: we have no use for topic percent rank
Prepare to remove this column
2018-07-05 15:10:19 +10:00
Maja Komel
cb89797e9a FEATURE: shows remaining backup codes in user preferences 2018-07-04 10:45:42 +02:00
Leo McArdle
c3129444ea FIX: allow multiple secondary emails 2018-07-03 18:21:35 +08:00
Arpit Jalan
7550e9ff95 FIX: purge unactivated users with a message from non-human users 2018-06-29 13:03:04 +05:30
hellekin
25cfc98b67 Fix 'asscoiated' typo
I know that **Naming is CRITICAL** and that **Refactoring only NOT welcome**.

But since I spotted this (consistent) typo and the change does not affect any
functionality -- I checked the presence of "asscoiated" in the code base, I
guess the first rule trumps the second one.

It also gave me a false pretext to bypass my reluctance to use Google forms and
sign de CLA. Typos hurt the eye.
2018-06-29 11:10:05 +10:00
Sam
e0bc6590fd minor cleanup 2018-06-29 10:30:22 +10:00
Robin Ward
5d1d7e0e7d PERF: Scanning the id for this is signficantly slower in production 2018-06-28 11:04:40 -04:00
Sam
db14e10943 SECURITY: category badges should HTML escape names 2018-06-28 18:15:07 +10:00
Maja Komel
ec3e6a81a4 FEATURE: Second factor backup 2018-06-28 10:12:32 +02:00
misaka4e21
47cb46671a FEATURE: Support disabling tag creation for non-staff users. 2018-06-27 07:15:02 +08:00
David Lee
4644d777bd FEATURE: add website field to SSO 2018-06-25 16:09:39 +10:00
Jeff Wong
41f76a74f8 FEATURE: send message when a user reaches tl1 2018-06-22 13:20:00 -07:00
Jeff Wong
bc52bdfa12 Feature: unconditionally consider TL0 users as "first day" users 2018-06-21 10:53:08 -07:00
Guo Xiang Tan
f7d22bad90 FEATURE: Forced summary mode for megalodon topics.
This is mainly done for performance reasons and megalodon
topics are usually a byproduct of imports where site setting
limits are not respected.
2018-06-21 14:00:20 +08:00
Guo Xiang Tan
ac80360bea PERF: Help postgres make use of index in Post.summary. 2018-06-21 13:29:16 +08:00
Guo Xiang Tan
6ddd214476 FIX: Post#summary returning posts from other topics. 2018-06-21 12:00:54 +08:00
Joffrey JAFFEUX
50d11fd582
FIX: improves durability display check 2018-06-20 23:15:11 +02:00
Guo Xiang Tan
0365806b93 FIX: Properly display error when post action fails to create. 2018-06-20 21:20:23 +08:00
Joffrey JAFFEUX
fa43969fe2
FIX: crashes with date conversion in reports 2018-06-20 14:42:15 +02:00
Sam
35e0ccfc84 make linter happy 2018-06-20 18:03:27 +10:00
Sam
cb824a6b33 DEV: remove all calls to SqlBuilder use DB.build instead
This is part of the migration to mini_sql, SqlBuilder.new is being
deprecated and replaced with DB.build
2018-06-20 17:53:49 +10:00
riking
7f37ee9152 SearchLog: fix specs 2018-06-20 10:44:11 +10:00
riking
38a8e52ca4 FIX: Add time retention limit to search logs
3 years is a very conservative limit that allows for a very wide buffer
for year-over-year analysis. The max is set to 5 years because that is
the policy listed for logging in hosted Discourse.
2018-06-20 10:44:11 +10:00
riking
1de0ef137e FIX: SearchLog: Do not store IP of logged in users 2018-06-20 10:44:11 +10:00
Jeff Wong
2ff226e509 FIX: consider staged users mature (no spam checks) after 1 day 2018-06-19 09:41:10 -07:00
Sam
5f64fd0a21 DEV: remove exec_sql and replace with mini_sql
Introduce new patterns for direct sql that are safe and fast.

MiniSql is not prone to memory bloat that can happen with direct PG usage.
It also has an extremely fast materializer and very a convenient API

- DB.exec(sql, *params) => runs sql returns row count
- DB.query(sql, *params) => runs sql returns usable objects (not a hash)
- DB.query_hash(sql, *params) => runs sql returns an array of hashes
- DB.query_single(sql, *params) => runs sql and returns a flat one dimensional array
- DB.build(sql) => returns a sql builder

See more at: https://github.com/discourse/mini_sql
2018-06-19 16:13:36 +10:00
Jeff Wong
68e4e6a575 FIX: staged users are still tl0 but do not trigger spam if 1 week old. 2018-06-18 17:20:04 -07:00
Jeff Wong
9e55767f6a FIX: don't punish a user for being previously staged for spam flags. 2018-06-15 12:25:25 -07:00
Régis Hanol
ff06ce4cce fix the build 2018-06-13 23:05:23 +02:00
Régis Hanol
051d1a3c36 PERF: faster Screened IP Address roll up 2018-06-13 22:47:23 +02:00
Robin Ward
fd54c92a52 FEATURE: New site setting, whitelisted_link_domains
If provided, users who normally couldn't post links (say, due to a
low trust level), can post links to those specific hosts.
2018-06-13 16:11:22 -04:00
Maja Komel
6c9190357c fix get from url for external uploads without CDN 2018-06-13 16:21:28 +10:00
riking
94f70c7b5c FIX: TopicViewItem: do not store IP of logged in users 2018-06-12 12:43:56 +10:00
riking
4b2e2ea8ef Change TopicViewItem to allow null IP address 2018-06-12 12:43:56 +10:00
Gerhard Schlager
150ae21489 FEATURE: Log user merge in staff logs 2018-06-11 18:43:56 +02:00
Vinoth Kannan
a6303073a0 Strip images from cooked for topic excerpt 2018-06-11 14:43:53 +05:30
Guo Xiang Tan
ad5082d969 Make rubocop happy again. 2018-06-07 13:28:18 +08:00
Sam
89ad2b5900 DEV: Rails 5.2 upgrade and global gem upgrade
This updates tests to use latest rails 5 practice
and updates ALL dependencies that could be updated

Performance testing shows that performance has not regressed
if anything it is marginally faster now.
2018-06-07 14:21:33 +10:00
Guo Xiang Tan
d600e71b3d FIX: Clean up stale UserExport records daily.
* Add tests for `UserExport.remove_old_exports`
2018-06-05 09:43:40 +08:00
Robin Ward
fab59c66f0 FIX: Protection against dangling category group records 2018-06-04 15:43:26 -04:00
Arpit Jalan
89eca87f16 FEATURE: add staff action log for post rejections 2018-06-01 21:48:27 +05:30
Guo Xiang Tan
9ef61e0af5 PERF: Prefer exists? instead of loading AR object. 2018-06-01 09:44:14 +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
8d9c77e113 optimize group invitation code 2018-05-28 17:59:14 +05:30
Arpit Jalan
c8bc942333 FIX: do not add invited user to automatic groups 2018-05-28 17:17:48 +05:30
Gerhard Schlager
ed2ae3cb0a FIX: Load post revisions in correct order 2018-05-28 11:25:24 +02:00
Guo Xiang Tan
754458e6a2 PERF: Minor but we can just pass a hash to where.
```
Warming up --------------------------------------
          4 x .where     1.040k i/100ms
          1 x .where     1.677k i/100ms
Calculating -------------------------------------
          4 x .where     10.321k (± 5.2%) i/s -     52.000k in
5.053803s
          1 x .where     17.117k (± 3.8%) i/s -     85.527k in
5.004107s

Comparison:
          1 x .where:    17117.1 i/s
          4 x .where:    10321.3 i/s - 1.66x  slower
```
2018-05-28 16:41:38 +08:00
Sam
5a32a70d6c FIX: ColorScheme color missing was returning "nil" 2018-05-28 11:46:00 +10:00
Régis Hanol
5b2e7c8d10 fix the build 2018-05-26 03:11:10 +02:00
Régis Hanol
338d39265a FIX: don't publish notifications_state when user has been deleted 2018-05-26 02:27:54 +02:00
Régis Hanol
d23229df85 Let's use the same method 2018-05-26 02:16:53 +02:00
Régis Hanol
f988fa31aa FIX: ensure 'notifications_state' is up to date after creating a notification 2018-05-26 02:09:48 +02:00