Commit Graph

17051 Commits

Author SHA1 Message Date
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
Sam
cbaf521fc1 correct regression and add integrity spec for onceoffs 2018-06-20 09:09:31 +10:00
Kris
b637b57e4f FIX: Alignment of user dropdown menu icons 2018-06-19 15:38:06 -04:00
Kris
82cb163ef3 formatting fix 2018-06-19 13:07:16 -04:00
Kris
0d81633da9 Replacing onebox loading gif with css spinner 2018-06-19 12:59:00 -04: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
Neil Lalonde
3725fd8345
Merge pull request #6002 from featheredtoast/trust-previously-staged-users
FIX: don't punish a user for being previously staged for spam flags.
2018-06-18 15:14:31 -04:00
Jeff Wong
7a1cefce78 Fix: let user fields respond when their labels are clicked 2018-06-18 11:15:22 -07:00
Joffrey JAFFEUX
913d97e780
fix prettier 2018-06-18 20:10:48 +02:00
Kris
ceb9226518 Giving post admin menu variable width in case of long translations 2018-06-18 13:02:50 -04:00
Joffrey JAFFEUX
3fc82bf200
FIX: adds a title to composer actions header 2018-06-18 19:01:37 +02:00
Joffrey JAFFEUX
f2dbe66367
FEATURE: adds a /admin/reports route to list all reports 2018-06-18 12:31:56 +02:00
Joffrey JAFFEUX
4b604b1e68
FIX: displays correct upload icon when only images are allowed 2018-06-18 11:16:34 +02:00
Arpit Jalan
f1d1207725 FIX: improve context when user deletes self 2018-06-18 11:36:22 +05:30
Joe
e8e8d540d3
FIX: desktop pin-topic modal not wide enough for date-picker 2018-06-16 15:19:08 +08:00
Arpit Jalan
a30165ab8d FIX: show time on activity column instead of random number 2018-06-16 07:12:43 +05:30
Jeff Wong
9e55767f6a FIX: don't punish a user for being previously staged for spam flags. 2018-06-15 12:25:25 -07:00
Rafael dos Santos Silva
51cb38783e FIX: start_url was wrong in non-subfolder 2018-06-15 14:29:33 -03:00
Joffrey JAFFEUX
60ff0e9b8c
missing prettified files 2018-06-15 18:42:20 +02:00
Joffrey JAFFEUX
03a7d532cf
DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
Arpit Jalan
c7ee70941e FEATURE: show category page options on wizard 'homepage' step 2018-06-15 19:11:41 +05:30
Joe
4645cf6b28
FIX: remove unwanted space in user notification items 2018-06-15 15:44:51 +08:00
Kris
a8660b8be9 formatting build fix 2018-06-15 00:09:09 -04:00
OsamaSayegh
06777aa47d FIX: use the correct notification levels descriptions for PMs 2018-06-15 14:04:14 +10:00
Kris
872656fe52 Give admin list more horizontal space 2018-06-14 23:50:46 -04:00
Robin Ward
4a4406de8c FIX: Properly avoid n+1 query on flagged posts
This code was in here previously but some columns were included that
were not used.
2018-06-14 09:46:52 -04:00
Joffrey JAFFEUX
c82887a0f0 Revert "tests prettier trigger"
This reverts commit f74d86639f.
2018-06-14 15:46:03 +02:00
Joffrey JAFFEUX
f74d86639f
tests prettier trigger 2018-06-14 15:15:25 +02:00
Jeff Wong
160898acf3 Feature: add jump to post modal on mobile 2018-06-13 22:01:35 -07:00
Rafael dos Santos Silva
8fc08aad09 FEATURE: Update the webmanifest
- Remove share target because the spec is changing
- Allow any orientation again because natural is too restrictive
- Use correct file and mime types for the manifest
2018-06-14 00:13:28 -03:00
Arpit Jalan
94ae89f61f FIX: properly retrieve user custom fields 2018-06-14 07:33:25 +05:30
Joffrey JAFFEUX
276526e30e
FIX: improves micro data support 2018-06-13 23:20:48 +02: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
Neil Lalonde
debbb5be16 FIX: staff see the wrong message when changing another user's email address 2018-06-13 15:18:48 -04:00
Robin Ward
ae728702a6 Revert "Revert "Preload custom user fields when viewing flag queue""
This reverts commit 1bb12ee1b6.
2018-06-13 11:44:13 -04:00
Arpit Jalan
4107a02ae8
Merge pull request #5991 from jjaffeux/plugin-sharing-api
FEATURE: adds plugin sharing api
2018-06-13 17:24:03 +05:30
Joffrey JAFFEUX
eddcb07f03 FEATURE: adds plugin sharing api 2018-06-13 13:25:51 +02:00
Régis Hanol
f93ba5694e UX: show quote button at end of selection on Opera 2018-06-13 11:07:19 +02:00
Joffrey JAFFEUX
4e0c06a0b1
FIX: focusing input displayed after clicking on a link more reliable 2018-06-13 10:31:46 +02:00
Maja Komel
6c9190357c fix get from url for external uploads without CDN 2018-06-13 16:21:28 +10:00
Jeff Wong
0c2f590c64 Feature - allow user and group specific cards styling (#5989) 2018-06-13 14:08:03 +08:00
Sam
12fd0b827e PERF: release results in a couple of cases 2018-06-13 15:11:43 +10:00
Jeff Wong
3d1ff8e0ad FIX: correct group membership on cards for admins 2018-06-12 14:57:26 -07:00
Joshua Rosenfeld
1bb12ee1b6 Revert "Preload custom user fields when viewing flag queue"
This reverts commit 5bd1c5cc95.
2018-06-12 16:46:31 -04:00
Robin Ward
5bd1c5cc95 Preload custom user fields when viewing flag queue 2018-06-12 16:17:22 -04:00
Régis Hanol
d8063d09d5 FIX: Add members button wasn't working on mobile for non-admin group owners 2018-06-12 15:05:22 +02:00
Joffrey JAFFEUX
3381a0a42a
UX: reworks dashboard problems section to be in line with new style 2018-06-12 12:47:03 +02:00
Sam Saffron
030e322a39 FEATURE: block top level /my/ routes 2018-06-12 19:47:45 +10:00
Arpit Jalan
59a8471308 FIX: do not show SSO external_email to moderators 2018-06-12 14:20:44 +05:30
Vinoth Kannan
72196ee951 Move the dashboard-problems block outside the condition 2018-06-12 12:01:41 +05:30
Guo Xiang Tan
c06824e9c2 FIX: Clients get stucked in readonly mode if messageBus fails. 2018-06-12 12:02:37 +08:00
kleinfreund
4ce1d230c7 Prefer throwing a new Error object instead of just a string expression 2018-06-12 12:56:22 +10:00
Angus McLeod
0997eb6486 Add theme stylesheet(s) to the crawler layout 2018-06-12 12:47:48 +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
Shoshana Berleant
f48338df54 add plugin outlet create-account-after-password 2018-06-12 12:42:37 +10:00
Jeff Wong
4599cc8435 FIX: PM participants listed inline 2018-06-11 18:14:25 -07:00
Jeff Wong
44ee26721a FIX: add check for missing assets file in development 2018-06-11 11:18:34 -07:00
Gerhard Schlager
150ae21489 FEATURE: Log user merge in staff logs 2018-06-11 18:43:56 +02:00
Joffrey JAFFEUX
73731463a3
UX: makes sure close modal icon is aligned with title 2018-06-11 13:38:57 +02:00
Vinoth Kannan
a6303073a0 Strip images from cooked for topic excerpt 2018-06-11 14:43:53 +05:30
Joe
2ec53a9628
FIX: adjust 2FA input width in mobile login form 2018-06-10 21:33:41 +08:00
Joe
5eb0066be9
FIX: adjust max-width of social login buttons for non-English locals 2018-06-09 14:14:59 +08:00
Gerhard Schlager
a26889ada2 FIX: Don't delete profile views during user anonymization
There's no need for that and it can take a lot of time.
2018-06-08 15:50:07 +02:00
Gerhard Schlager
4ba910ac54 Update username only after successful user anonymization 2018-06-08 15:50:07 +02:00
Gerhard Schlager
2564a8285d REFACTOR: Run some parts of user anonymizing in background job 2018-06-08 15:50:07 +02:00
Gerhard Schlager
cf038cf72a FEATURE: Remove more PII during user anonymizing
Removes
  * invite if the user was invited
  * email tokens
  * incoming emails
  * email log entries
  * raw emails from posts
2018-06-08 15:50:07 +02:00
Joffrey JAFFEUX
174d392e5a
DEV: adds prettier (#5956)
Run `prettier --write "app/assets/stylesheets/**/*.scss" "plugins/**/*.scss"` after making sure you installed it with `yarn`

It's recommended to configure your editor to run prettier on file save.
2018-06-08 11:49:31 +02:00
Arpit Jalan
8bd4c11f53 FIX: do not show email disabled notice to staff when they can receive emails 2018-06-08 11:22:26 +05:30
Jeff Wong
b7d92061e2 FEATURE: add an option to create undismissable modals 2018-06-07 20:49:33 -07:00
Angus McLeod
f10b663eb4 BUGFIX: string in server_plugin_outlet needs to be mutable 2018-06-07 18:27:34 +02:00
Arpit Jalan
f9ab3848ed FEATURE: support disabling emails for non-staff users 2018-06-07 18:31:08 +05:30
Joffrey JAFFEUX
d556975cdc
FIX: do not use number helper for charts Y value 2018-06-07 14:56:49 +02:00
Joffrey JAFFEUX
74ced977be
FIX: incorrect backup and update times on dashboard 2018-06-07 11:18:17 +02:00
Joffrey JAFFEUX
1071aa21ab
FIX: slightly safer rounding 2018-06-07 10:59:17 +02:00
Joffrey JAFFEUX
ab089cd68b
FIX: makes format number round the value before using parseInt 2018-06-07 10:44:21 +02:00
Joe
c3ac32d991
FIX: user-fields layout in desktop create account form 2018-06-07 14:03:54 +08:00
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
Joe
56dbbfbd2a
FIX: user-fields layout in mobile create account form 2018-06-06 21:02:35 +08:00
Vinoth Kannan
d8e641cd98 FIX: avatar_url includes upload_path twice when local storage used 2018-06-06 18:27:30 +05:30
Guo Xiang Tan
a83ab01264 REFACTOR: Remove extra param for group mentionable and messableable route. 2018-06-06 09:42:09 +08:00
Arpit Jalan
ccbaa719ee
Merge pull request #5923 from techAPJ/group-messageable
FIX: do not verify group visibility when checking for mentionable/messageable
2018-06-06 06:45:22 +05:30
Neil Lalonde
9ba9ff187c Add plugin outlet to admin plugins index 2018-06-05 17:47:30 -04:00
Arpit Jalan
f8d82f135f FIX: do not verify group visibility when checking for mentionable/messageable 2018-06-05 16:59:21 +05:30
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
Rafael dos Santos Silva
74c33a5316
Merge pull request #5915 from jjaffeux/sharing-macos-chrome
FIX: sharing popup not showing on macos/chrome
2018-06-04 20:38:10 -03:00
Joffrey JAFFEUX
40b3efacaa FIX: sharing popup not showing on macos/chrome
Despite `navigator.share` being defined the call was failing with this error:

```
sharing DOMException: Internal error: could not connect to Web Share interface.
```
2018-06-05 01:18:57 +02:00
Robin Ward
fab59c66f0 FIX: Protection against dangling category group records 2018-06-04 15:43:26 -04:00
Régis Hanol
6024fb84cc make rubocop happy 2018-06-04 19:06:52 +02:00
Régis Hanol
ab8cdd6b5b
Upload.url can't be NULL 2018-06-04 18:43:00 +02:00
Régis Hanol
085eaaf18d
FIX: always delete invalid upload records 2018-06-04 18:40:57 +02:00
Arpit Jalan
46fc57222f FEATURE: improve handling of site setting secrets 2018-06-04 21:31:34 +05:30
Arpit Jalan
36f9af4fa4 minor optimizations for post rejected logs 2018-06-02 09:44:55 +05:30
Robin Ward
597ffd7e3f FIX: Keyboard shortcuts didn't work on subfolders 2018-06-01 14:38:09 -04:00
Arpit Jalan
89eca87f16 FEATURE: add staff action log for post rejections 2018-06-01 21:48:27 +05:30
Kris
41999b9949 Limiting history modal height and width 2018-06-01 11:59:29 -04: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
Joe
560a950da9
FIX: alignment for instructions on change email and 2FA fields 2018-06-01 09:51:46 +08:00
Guo Xiang Tan
9ef61e0af5 PERF: Prefer exists? instead of loading AR object. 2018-06-01 09:44:14 +08:00
Kris
ba7aff62db safety so pre blocks can't break modal width 2018-05-31 18:19:27 -04:00
Kris
6c15effca2 envelope missing on invite page, long pre lines making modals wide 2018-05-31 18:11:24 -04:00
Guo Xiang Tan
95f9b72351 FIX: Update activation email route was returning a generic json error. 2018-05-31 14:19:43 +08:00
Kris
3e9f1d5cf6 Few small modal fixes 2018-05-30 23:24:43 -04:00
Kris
57cef06192 incoming email modal width too narrow 2018-05-30 15:28:29 -04:00
Joffrey JAFFEUX
8128cbd7db
UX: adds subtitle support for modals 2018-05-30 17:14:00 +02:00
Joffrey JAFFEUX
43b1768987
UX: ceil dahsboard values 2018-05-30 16:32:43 +02:00
Arpit Jalan
704cca3de2 FIX: add proper search context for personal messages 2018-05-30 14:47:46 +05:30
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
Gerhard Schlager
864ada835b FEATURE: Add Bulgarian language 2018-05-29 21:07:17 +02:00
Kris
7483805f0c Increasing min-width of modals for larger screens 2018-05-29 13:13:35 -04: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
Joffrey JAFFEUX
ee8cda691d
FIX: simplifies and corrects new collection header tag/drop behaviour 2018-05-29 17:34:34 +02:00
Gerhard Schlager
ce687f334b UX: The "enable 2FA" string was hard to translate 2018-05-29 16:25:43 +02:00
Joffrey JAFFEUX
a8079ab679
FIX: show none/all on cat/tag drop only when needed 2018-05-29 16:08:31 +02:00
Joffrey JAFFEUX
597095f56f
UX: adds visual feedback when hovering info 2018-05-29 13:31:57 +02:00
Joffrey JAFFEUX
87edde3113
UX: improves dashboard UI for RTL locales 2018-05-29 10:22:31 +02:00
Arpit Jalan
277e216d25 FIX: link to pm tags when searching in personal messages 2018-05-29 12:32:20 +05:30
Sam
df815d6c0e DEV: prefer using ordering in relation over default scope 2018-05-29 09:34:12 +10:00
Joffrey JAFFEUX
16d0ab5654 Revert "UX: localizes titles in dashboard table reports"
This reverts commit 409c0ddf85.
2018-05-28 20:35:22 +02:00
Joffrey JAFFEUX
409c0ddf85
UX: localizes titles in dashboard table reports 2018-05-28 20:03:05 +02:00
Joffrey JAFFEUX
4b9c713581
FIX: avoids hidding mobile keyboard on each keystroke 2018-05-28 16:18:25 +02:00
Joffrey JAFFEUX
a585c19f2e
FIX: prevents collection header from going under rows 2018-05-28 15:47:07 +02:00
Arpit Jalan
8d9c77e113 optimize group invitation code 2018-05-28 17:59:14 +05:30
Joffrey JAFFEUX
478ccb6698
UX: lower no-change trend emphasis in charts 2018-05-28 13:55:25 +02:00
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
Joffrey JAFFEUX
82e5727287
UX: -2/+2% change in stats should be no-change in dashboard 2018-05-28 10:55:42 +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
Arpit Jalan
54338cfdcb FEATURE: add support for group_name parameter in /new-message route 2018-05-28 13:26:41 +05:30
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
Guo Xiang Tan
0b55416742 UX: Don't display all groups option if group directory is disabled.a
https://meta.discourse.org/t/all-groups-option-leads-to-access-denied-page/88464
2018-05-28 11:32:55 +08:00
Sam
5a32a70d6c FIX: ColorScheme color missing was returning "nil" 2018-05-28 11:46:00 +10:00
Kris
4bd24e78fc padding fix, small phone fix 2018-05-26 01:12:33 -04:00
OsamaSayegh
449399bef3 return 403 forbidden when local logins disabled 2018-05-26 05:18:19 +03: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
Kris
cc0a5f4526 login fixes, auth message and alignment 2018-05-25 19:15:39 -04:00
Kris
6fc292fef5 reducing some specificty 2018-05-25 17:33:45 -04:00
Robin Ward
587a9c82f5 FIX: Use the username formatter when updating cooked usernames 2018-05-25 17:29:06 -04:00
Kris
3b2af4b91f Adjustments and fixes to updated login design 2018-05-25 16:44:44 -04: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