Commit Graph

4215 Commits

Author SHA1 Message Date
0b9437cee7 FIX: more resilient/consistent dashboard caching (#6223) 2018-08-01 09:45:50 -04:00
7c7dfa4e5e FIX: wraps any query with the slow query guard (#6222) 2018-08-01 07:39:57 -04:00
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
5febe71baa FIX: prevents crash if flagger doesn’t exist (#6219) 2018-07-31 23:48:54 -04:00
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
919e8db686 FIX: Check for group name availability should skip reserved usernames. 2018-08-01 11:09:33 +08:00
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
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
fd29ecb91a UX: include a flag reason in the post-deleted-by-staff-because-of-flags message 2018-07-30 16:45:46 -04:00
87537b679c Drop reply_key, skipped and skipped_reason from email_logs. 2018-07-30 11:39:28 +08:00
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
6f9a91cbd5 Merge pull request #6175 from vinothkannans/post_approval_webhook
FEATURE: Webhook for post approval events
2018-07-27 10:50:49 +08:00
af5b88f8e2 Rename approval web hook event type to queued post 2018-07-26 10:29:38 +05:30
f8b367cc9c Fix the build. 2018-07-26 10:17:51 +08:00
30242972d3 Add spec for 4bf3bf6786. 2018-07-26 09:16:14 +08:00
f94aeaf6cf SECURITY: force IM decoder based on file extension - part 3 2018-07-25 23:55:06 +02:00
800c57c6ab SECURITY: force IM decoder based on file extension - part 2 2018-07-25 23:08:02 +02:00
4bf3bf6786 SECURITY: force IM decoder based on file extension 2018-07-25 22:00:04 +02:00
3fd2571abc Fix typo in color scheme 2018-07-25 15:12:01 -04:00
5059dad8f0 FEATURE: Webhook for post approval events 2018-07-25 23:43:19 +05:30
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
578c8e861b FIX: refreshes disk_space on backup create/destroy (#6169) 2018-07-25 08:26:30 -04:00
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
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
20a21b1240 Move into MiniSQLMultisiteConnection, and add test for rollback 2018-07-24 09:41:55 +01:00
98f84d1a4e Update annotations. 2018-07-24 15:49:55 +08:00
7a2bf8e368 Fix invalid query syntax when CategoryCustomField#value is blank. 2018-07-24 14:48:27 +08:00
fad9c2b971 PERF: Move EmailLog#reply_key into new post_reply_keys table. 2018-07-24 13:51:53 +08:00
ae8b0a517f PERF: Split skipped email logs into a seperate table. 2018-07-24 13:14:37 +08:00
9b84e78fdf Update annotations. 2018-07-24 11:14:19 +08:00
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
32062864d3 FIX: removes system from user to user report (#6144) 2018-07-23 10:33:12 -04:00
84ab825e41 FEATURE: Webhook for user destroyed event (#6124) 2018-07-23 13:19:49 +05:30
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
d705f859db Exclude System user from post_edits report (#6130) 2018-07-21 11:17:25 +02:00
1d5096eb46 FIX: lazy load more reports in dashboard 2018-07-20 23:35:53 -04:00
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
69450750d1 shorter method name and better specs 2018-07-20 10:13:27 +03:00
64f0cf425b FIX: removes uncessary reports loading (#6119) 2018-07-19 19:30:13 -04:00
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
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
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
a9ebad3f6c FIX: do not add a moderator post when post is flagged via direct message (#6100) 2018-07-18 23:18:14 +02:00
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
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
547b571d84 FIX: topic owner should watch the new topic when moving posts to a new topic 2018-07-18 15:23:32 +03:00
6d6e026e3c FEATURE: selectable avatars 2018-07-18 12:57:43 +02:00
487ef9773f Better logging when optimizing image fails. 2018-07-18 14:11:23 +08:00
b068a8a771 Fix the build. 2018-07-18 14:03:27 +08:00