Commit Graph

888 Commits (331b1a85bbe8b3901e805607655ec448b4aa563d)

Author SHA1 Message Date
Barış Soner Uşaklı d07e3e6d97 if not in defaults use string
Barış Soner Uşaklı 4fff5e9baf closes
Barış Soner Uşaklı ac39112271 remove more parseInts
Barış Soner Uşaklı 9c022afae1
Parse int ()
* Store config fields as JSON in the db

Fewer parseInts

* Remove unnecessary parseInts

* remove some dupe code add tests

* remove console.log

* remove more parseInts

* WIP: read meta.configs defaults from defaults.json

remove more parseInts

* more work

* add log for failing test

* update admin pwd

* fix tests, dont require posts/cache before configs are initialized

* handle saves

* Test boolean conditions

* remove more parseInts

* Fix boolean values

* remove lots more parseInts

* removed json parsing

* renamed var to number

* categories dont have timestamp
Barış Soner Uşaklı ee2f9e9434 remove some parseInts
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
Barış Soner Uşaklı 038f97b0f5 more settings tests
Barış Soner Uşaklı 8c9754ecee add test for /admin/settings/user
Barış Soner Uşaklı 250e8c01ff closes
Barış Soner Uşaklı da1a90a470 add search test
Baris Usakli baf91089a6 remove unused methods
Baris Usakli 74fdadf8a6 test pubsub cache
Baris Usakli 444fd70ba3 test pubsub
Barış Soner Uşaklı 986511e718 try with higher timeout
Barış Soner Uşaklı 1d15dc089b revert isCluster
Barış Soner Uşaklı aa567a5f2d print out connString and opts
Barış Soner Uşaklı 38ce83304d up widget essentials
Barış Soner Uşaklı 2d8d234c57 test mongodb again
Barış Soner Uşaklı 8f7482955d set cluster to false again
Barış Soner Uşaklı fd31ad3cfe disable busy check on tests
Barış Soner Uşaklı f4df89fe90 closes
Barış Soner Uşaklı 5dbc7f032a reset post cache between each suite
Barış Soner Uşaklı fc68263f91 change to TEST_ENV
Barış Soner Uşaklı 45b6e56665 add node_env to tests
Barış Soner Uşaklı 85c60316ed
upgrade to winston 3.1, closes ()
* upgrade to winston 3.1

* fix winston in web/install and tests
Barış Soner Uşaklı b57db7fd8e
update groups join to take array of group names ()
* allow groups.join to take an array of group names

* pass an array to groups.join/leave in privileges

* split up groups/membership

* add hits/miss to group cache

* fix typo
Barış Soner Uşaklı c06480b82e add tests for blocked users teaser/unread
Barış Soner Uşaklı d4db8c2d42 removed reset
Barış Soner Uşaklı 1024a0efa1 add reset to pubsub for tests
Baris Usakli 7d8fc09226 add test for pubsub
Baris Usakli 28f2144933 remove time out on plugin upgrade test
Baris Usakli a867b77509 add assert message to test
Barış Soner Uşaklı e615391b22 convert values to string before removing
Barış Soner Uşaklı 5c7dd54815
fix zsets and update them on post move, closes ()
Baris Usakli 5f49a1d82c disable timeout on build templates
Baris Usakli 9ed4239d8e small changes and test for user/:slug/categories
Barış Soner Uşaklı b58ab48485 add test for /sessions controller
Barış Soner Uşaklı a7c4c59121 change to series
Barış Soner Uşaklı 1bea247748 add username/email to user-delete event
Barış Soner Uşaklı f77091d1ed change user delete so it returns quickly
Barış Soner Uşaklı 805da98a36 remove unnecessary groups.resetCache calls
Barış Soner Uşaklı 061b279c48 Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı 77beaf2e15
Allow local login,closes ()
* WIP

* reset groups cache after every suite
Barış Soner Uşaklı 2bd02a7ae1 disable timeout on plugin installs
Barış Soner Uşaklı 944972c6f2 change to series
Barış Soner Uşaklı 18d0deeccb
update deprecated methods ()
Barış Soner Uşaklı 1cb2e1e368 remove console.log switch to series
Barış Soner Uşaklı f618ba8e1e add private category test for unread tids
Barış Soner Uşaklı 95501e8fee
closes closes ()
* closes  closes 

* fix test, delete keys

* delete all bans on user delete

* fix upgrade script to actually read reason
Barış Soner Uşaklı 59b988a205 change test so it checks url
Barış Soner Uşaklı b7ead6dc9c
Replace jimp with sharp ()
* add probe image size and max image size

* replace jimp and image-probe with sharp

* better name for test

* resize with just path

* resize thumb inplace

* use filename
Barış Soner Uşaklı ea1697d073 remove console.log
Barış Soner Uşaklı 25fed0aa8d change isPasswordCorrect to return false if user does not have password
Barış Soner Uşaklı 2a2e8136cd
fix tests
Ben Lubar 33228bb7fe PostgreSQL database driver ()
* [test/database/list] Fix test list 4 being used in two different tests

* [database/postgres] PostgreSQL database driver

* [database/postgres] Make transactions work based on continuation scope.

* [database/postgres] Implement nested transactions

* eslint --fix

* Add database changes from earlier this week to the PostgreSQL driver.

* Fix typo

* Fix postgres.incrObjectFieldBy returning undefined instead of null when given NaN

* [database/postgres] Fix sortedSetsCard returning an array of strings.

* Update socket.io postgres adapter

* Fix PostgreSQL erroring when multiple updates are made to the same sorted set entry in a single operation.

Add a test case to catch this error.

* Fix lint errors.

* Only prune sessions on one instance in a cluster to avoid deadlocks.

They're caught and handled by the database server, but they spam the logs.

* Fix arguments.slice.
Barış Soner Uşaklı fa499aef18 closes
Baris Usakli 546b13b897 fix lint and tests
Barış Soner Uşaklı c7d6cacd98 closes
Peter Jaszkowiak 04d31fe1d4 Precompile all templates
- Benchpress compilation is 33x faster now
- Native module with JS fallback and pre-built binaries
- Dev template build is <1sec now
- Minified template build is ~5sec (uglify accounts for almost all)
Barış Soner Uşaklı 3449cf321b add back cache and pubsub
Barış Soner Uşaklı ae0563375e derp
Baris Usakli 584f88e092 blocks WIP
Baris Usakli be1e83bfc1 fix tests
Barış Soner Uşaklı 82b2a20d0c user tests
Barış Soner Uşaklı ccad95cf73 closes
Barış Soner Uşaklı 2fd2accf8c add tests for top topics
fix popular page displaying 18 topics per page
Barış Soner Uşaklı 4684ab3bf6 suggest topic test
Barış Soner Uşaklı c3fc4a06bf test sortedSetUnion with scores
Julian Lam 8d41e319ea fixed tests
Julian Lam 8e832abf1e additional tests for post diffs privilege checking
Julian Lam 510dd268cc fix tests
Barış Soner Uşaklı 14f6e74bad closes
Barış Soner Uşaklı a7267df404 closes
Barış Soner Uşaklı 4504bbae52 2 diff test
Barış Soner Uşaklı 229e49cf8f closes , closes
Barış Soner Uşaklı 65dc530df5 some controller tests
Barış Soner Uşaklı d977934c66 adjust username test
Barış Soner Uşaklı 8e8058ec6e closes
Julian Lam 445b92ae38 Revert "fix some tests"
This reverts commit 2551df80f7.
Barış Soner Uşaklı cdc3ef09e9 closes
Julian Lam 2551df80f7 fix some tests
Barış Soner Uşaklı 9132743870
Julian Lam 5dc25a3c00 Merge remote-tracking branch 'origin/master' into chat-kick-support
Julian Lam a08572b800 kick support for chats,
Barış Soner Uşaklı beadcd7857 fix tests, remove dupe exposeUid
Julian Lam dc386b5b23 Merge branch 'master' into user-blocking
Julian Lam a0643b63df uncommenting tests again
Julian Lam 8db98b5cf4 additional UCP integration for
Barış Soner Uşaklı bc18b489e6 fix group test
Barış Soner Uşaklı 9ae5946e7a Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Julian Lam 3951bb9532 Merge remote-tracking branch 'origin/master' into user-blocking
Barış Soner Uşaklı 505e511e4d fix tests
Julian Lam 322d8236d2 added test for User.blocks.is, re:
Julian Lam 032ec8b443 tests!!! glorious tests!!!
re: 
Julian Lam 1f1e055509 updated post association code to only associate files that exist, closes
Julian Lam 0f13ae3c87 added isOrphan method,
Julian Lam 2e125293e6 save reverse association of md5 of upload to pid,
Julian Lam 850f59a1ae additional functionality, integration, and testing for
Julian Lam 5943389b7a tests for
Julian Lam 6088c37f5a Revert "fixing tests"
Turns out baris already fixed them

This reverts commit 3bc0266aa4.
Julian Lam 3bc0266aa4 fixing tests
Barış Soner Uşaklı ed289ebeab two more text fixes
Julian Lam 65c8457898 fixing tests that broke due to gdpr requirement
Barış Soner Uşaklı 04979f86a8 delete users uploads on account delete
store uid:<uid>:uploads
Barış Soner Uşaklı 0070f5c1b2 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Julian Lam 0158b1aa91 Various password logic fixes on client and server-side
Fixes 
Fixes 
Barış Soner Uşaklı ae0f1847ae allow multiple origins for access-control-allow-origin header
add access-control-allow-credentials header to acp
Julian Lam bf2e905ced fixed tests, closes
Peter Jaszkowiak eaae5b52cd ACP quick actions ()
* ACP quick actions

- Moved restart, build & restart, and logout into separate buttons
- Moved buttons on mobile into the side menu
- Added version and upgrade alert to header / mobile menu
- Moved version checking to server-side with a cache for rate limiting
- Changed "reload" translations to "rebuild and restart"

* Change info alert to black-on-white to match focused search bar

* Fix tests

* Fallback for failed fetch of latest version
Barış Soner Uşaklı fde44cb9b9 pass array to groups.destroy
pass array to db.sortedSetRemove
Barış Soner Uşaklı be5c237388 fix decr/incrObjectField if key in array doesn't exist create it
Barış Soner Uşaklı 6a9a73c86c changes to leaveAllGroups
Groups.destroy can take an array of groupnames
Groups.leave can take an array of groupnames
db.incrObjectField/decrObjectField can take an array of keys
db.sortedSetRemove can take an array of keys and values
db.setRemove can take an array of keys
Barış Soner Uşaklı 7221b71b68 add test for srem with multi elements
Baris Usakli 959a742c63 add llen to dbal
Julian Lam 9ea6dbc0e7 fix flag tests
Barış Soner Uşaklı bce640e514 closes
Julian Lam c93f943bef Merge branch 'develop'
Barış Soner Uşaklı e1c6761087 closes
Barış Soner Uşaklı 7b45a6ea8b Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Julian Lam 0d65cec3d0 fixing tests
Baris Usakli 9b78b95c47 fix tests
Julian Lam 1ce448f2a1 Merge remote-tracking branch 'origin/master' into develop
Barış Soner Uşaklı 15e9bbac92 closes
Barış Soner Uşaklı 723f31a362 closes
Baris Usakli e99d4a5c61 closes
Baris Usakli ecc2b9560d parseInt data.hidden add tests
Barış Soner Uşaklı 7a2d6fe22d Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Barış Soner Uşaklı b084a596fa closes
Barış Soner Uşaklı 155e20d216 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Barış Soner Uşaklı 0a5d16d1cd closes
Barış Soner Uşaklı 33a8cb947e Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Barış Soner Uşaklı d8b5d40668 closes
Julian Lam 457194b333 Merge branch 'master' into develop
Barış Soner Uşaklı f3fda152bf closes
Barış Soner Uşaklı 72140e5338 closes , closes
Ben Lubar 5b1ed21634 [database/mongo] Improve speed of sortedSetRank ()
* [database/mongo] Improve speed of sortedSetRank

* [database/mongo] Fix sortedSetRank to filter by _key
Julian Lam c47987b305 fixed test for error when adding self to chat
Julian Lam f37b9d786d Merge remote-tracking branch 'origin/master' into develop
Barış Soner Uşaklı a2ba01b0d7 fix test
Barış Soner Uşaklı 2f3b7279be closes
Julian Lam ec07247854 Merge remote-tracking branch 'origin/master' into develop
Baris Usakli ecf6c0f3ec closes
Barış Soner Uşaklı 7eab9f6ab0 add missing ;
Barış Soner Uşaklı fdb221c106 fix helper test
Peter Jaszkowiak 4387d5d466 Ensure installed correct version of modules on startup, bump dependencies ()
* Ensure installed correct version of modules

* Bump dependencies

* Bump promise-polyfill

* Fix emailer test

* Fix auto-install regression

introduced in 9b5e0f9e95
Julian Lam d1ccd78ac2 Merge remote-tracking branch 'origin/master' into develop
Barış Soner Uşaklı 8446a733e5 closes
Barış Soner Uşaklı 87d40e9e78 fix increment to use data
Barış Soner Uşaklı ff6c6a54c1 make upload permissions global
give upload image permission to registered users on install
add global privileges to app.user.privileges for client side use
Julian Lam 82a95a03be Chat message soft deletion -- closes
Squashed commit of the following:

commit f84c06bdcc45f24ef7ffde6a8f33b48d8f97fc36
Author: Julian Lam <julian@nodebb.org>
Date:   Mon Dec 18 14:42:47 2017 -0500

    added restore handler for chat messages

commit 725cd370c6ea1e8f4a28298350f3dc024d4e668e
Author: Julian Lam <julian@nodebb.org>
Date:   Mon Dec 18 14:23:52 2017 -0500

    backend logic and testing complete for deletion and restoration of chat messages

commit 072da758319cc93fa4c6f8bc0d672a1b716dc06e
Author: Julian Lam <julian@nodebb.org>
Date:   Mon Dec 18 13:52:35 2017 -0500

    changing message delete logic to not remove mids, but to filter when retrieving

commit 68bf373305ab82737658a7c31dc5549af4d6d69f
Author: Julian Lam <julian@nodebb.org>
Date:   Mon Dec 18 12:37:58 2017 -0500

    logic to handle deletion of a deleted chat message -- added some failing tests

commit 6899d0d234fa752e227188aa69cfcabd0d0500cc
Author: Julian Lam <julian@nodebb.org>
Date:   Mon Dec 18 11:35:36 2017 -0500

    chat message deletion logic
Julian Lam 88b47f357b removed user.uploadFromUrl and associated logic as cropped image modal supercedes it @pichalite
Barış Soner Uşaklı 108c3c980a show invalid url error if request.head fails
Barış Soner Uşaklı b778c8433a change hook name
Barış Soner Uşaklı b55087dab7 closes
Barış Soner Uşaklı ea83be50a1 closes
Barış Soner Uşaklı 18b559bab0 fix test name
Barış Soner Uşaklı 2bf275fe29
Barış Soner Uşaklı 2455df438c fix test
Barış Soner Uşaklı 43180d4b83
Barış Soner Uşaklı 8e04e86e24 closes
Barış Soner Uşaklı 19ae8dc7e7 closes
Baris Usakli 3551d7d68e closes
Barış Soner Uşaklı e6d31c8bd2 add referer check to /api/admin/users/csv
Barış Soner Uşaklı e3fd402070 escape email in registration queue and invites
Barış Soner Uşaklı a7a3f3619b dont allow login with invalid ip, escape ip display on user/info page
caoyi da5997a06e Fix typo ()
Fix typo
Julian Lam 78c83f2561 fixing tests
Barış Soner Uşaklı 4f2f84e47c
Baris Usakli a19537dc25 closes
Baris Usakli b19310049d closes
Baris Usakli d9c38c7e4f closes
Julian Lam e83813c531
Emailer tests for Digest.getSubscribers ()
* added additional tests for Digest.getSubscribers

* added another test and tweaked existing digest list building tests
Barış Soner Uşaklı 07ed3807d8 remove console.log
Barış Soner Uşaklı caaa72b752 closes
Barış Soner Uşaklı d96674da64 add test for composer fix
Baris Usakli dbf815ed47 closes
Peter Jaszkowiak 4fcedc6f31 Enable imports in custom email templates ()
* Enable imports in custom email templates

* Compile emails on config change

* Add error logging

* Add emailer tests

* Fix tests

* Only build when config changes
Barış Soner Uşaklı 3bf7faf5fc increase rate limit delay
Peter Jaszkowiak 11b9cb7688 Fix , `action:home.get:*` returned to previous functionality ()
Added tests to confirm `buildHeader` is used and `/api` works
Peter Jaszkowiak f5385e38bf Add `/me*` route which redirects to `/user/[userslug]*` ()
* Add `/me*` route which redirects to the current user's information

- `/me` -> `/user/[usertslug]`
- `/me/bookmarks` -> `/user/[userslug]/bookmarks`
- `/me/settings` -> `/user/[userslug]/settings`

etc

* Add tests for `/me/*`
Baris Usakli e68e5122e2 add test to check breadcrumbs on home route
Baris Usakli 5604c62776 use the first set for sorting
Baris Usakli eeedba697b closes
Barış Soner Uşaklı 1d50c74cdc should error with no content
Barış Soner Uşaklı e4ea4d5134 move composer routes to its own file
Barış Soner Uşaklı 0316f51cdb show values if test fails
Peter Jaszkowiak bbdc55cb3a Better fix for ()
* Better fix for 

Also a nice newline so the line doesn't get overwritten when running `./nodebb upgrade`

* Optimizations for custom homepage

Move it into a separate module
Barış Soner Uşaklı 760c061b1d closes
Barış Soner Uşaklı 4551ee4768 some more tests
Barış Soner Uşaklı 8810f0f2a9 remove dupe meta
Julian Lam 7e0d0e0eb5 Merge remote-tracking branch 'origin/develop'
Peter Jaszkowiak dfad76120d Support npm@5 and yarn ()
* Support npm@5 and yarn

Use package.default.json
Partial 

- Overwrite package.json with package.default.json values
- `dependencies` field is merged with package.default.json version taking precidence
- `./nodebb upgrade` automatically does those things and runs `git pull`
- use `./nodebb upgrade --dev` to avoid the `git pull`

* added logic to preserve extraneous plugins installed in node_modules/

* Don't automatically git pull

* Simplify package-install, run it on upgrade just in case
Barış Soner Uşaklı 3dd83237b8 add some debug for failed tests
Baris Usakli c9465403f5 closes
Peter Jaszkowiak adc47fd053 Use relative linking ()
* Use relative linking

* Add copyFile method and tests

Closes 

* Fix relative linking on Windows

Hard links and junctions don't work with relative paths

* Fix tests

* Revert ghange to gitignore
Barış Soner Uşaklı 18f4f27fe0 closes
Barış Soner Uşaklı 5b2a674a4f closes
Barış Soner Uşaklı 25cd21fba8 closes
Barış Soner Uşaklı 6b1af76f08 closes
Barış Soner Uşaklı d5d6748c71 closes
Baris Usakli 47143a4a09 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Baris Usakli a500e0019c closes
Barış Soner Uşaklı c453fc7275 add widget reset test
Barış Soner Uşaklı a11058bce2 closes
Peter Jaszkowiak 62ae171432 Merge remote-tracking branch 'origin/master' into develop
Barış Soner Uşaklı 5d45f9fff2 fix lint
Barış Soner Uşaklı 6a2019c646 closes
Peter Jaszkowiak f336726173 Bump dependencies ()
* Bump dependencies

* Fix mocha v4 requiring --exit flag

Use nyc instead of the istanbul binary

* Print out summary instead of full report
Barış Soner Uşaklı e7318a1cea Mongo cache ()
* cache mongodb objects

remove user settings cache since it is cached at the object level

* removed indexOf from isMemberOfSets

* change has to get, change maxAge to 0
Barış Soner Uşaklı 108f84fd19 add type to dbal
Baris Usakli c4310395c9 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
# Conflicts:
#	package.json
Baris Usakli 8733f51f86 remove test for unused code
Barış Soner Uşaklı 797857e1d2 remove old test
Peter Jaszkowiak 60a42aa651 Merge branch 'translator-optimization' into develop
Peter Jaszkowiak 46fafb20b9 Remove string.js dependency
Barış Soner Uşaklı 557dfd5b47 testing new socket.io-client extraHeaders ()
* testing new socket.io-client extraHeaders

* change mongodb installation
Julian Lam df5178ce78 fixed typo in outgoing route test, and added new test for javascript protocol
Peter Jaszkowiak 1c35213934 Fix and forking while debugging ()
* Fix forking while debugging

Debugger address in use no longer happens

* Fix cropper error
Barış Soner Uşaklı b70f328520 closes
Peter Jaszkowiak da9da8190f Bump dependencies
Bumping eslint & configs meant making some linting fixes

For future reference, the `xmlhttprequest-ssl` library must be of equal versioning to the one in `engine.io-client`, otherwise it won't be deduped which causes the socket.io tests to fail
Peter Jaszkowiak dc87d7fc0f Use .js instead of .jst
Fix 
Baris Usakli c49837143c fix test
Baris Usakli 1358a89305 closes
Julian Lam 1034626896 Merge remote-tracking branch 'origin/develop'
Peter Jaszkowiak e8aa8c62f6 Update jsdom
Barış Soner Uşaklı bc6edba6df change post queue test
Barış Soner Uşaklı 5cc39e8546 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
# Conflicts:
#	package.json
#	src/views/admin/manage/ip-blacklist.tpl
Peter Jaszkowiak abffc29128 Use Benchpress ()
* Use Benchpress

* Use Benchpress.compileParse

* Error for template load failure

* Use benchpressjs package

* Compile templates on demand

* Fix user settings page

* Fix admin search to exclude `.jst` files

* Fix 500-embed

So ajaxify can still show an error if the server goes down
Barış Soner Uşaklı a46db9616c fix message delete and add test
Barış Soner Uşaklı 329bfeeb3b convert min/max to float
Barış Soner Uşaklı ff88be91fa Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Baris Usakli dc9b21021a escape moderation notes
Baris Usakli bc0645dc26 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Baris Usakli 37a8247293 add test for teaser content escape
Baris Usakli 575c9a41cd Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Barış Soner Uşaklı f161bbf956 Post queue ()
* 

* add user to post queue table

* add time of post into queue

add posting restrictions to queue

* fix shouldQueueLogic for guests

* add test for post-queue route
Barış Soner Uşaklı fc0e5421d6 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Baris Usakli c21f64c27f closes
Baris Usakli bc6b1a8f56 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
# Conflicts:
#	public/src/admin/extend/plugins.js
Baris Usakli 24bbf8fe00 closes
Baris Usakli de55c8e431 closes
Baris Usakli e071f94173 test debugParams.js
Julian Lam 303f1146b2 added upload_url to nconf vars @pitaj
Baris Usakli 875672522e Merge remote-tracking branch 'refs/remotes/origin/master' into develop
# Conflicts:
#	src/search.js
Baris Usakli a9dbdc75af closes
Barış Soner Uşaklı b3f6c423c6 fix test
Baris Usakli 5ce9f898b2 fix test
Julian Lam 84c1a182e5 Merge remote-tracking branch 'origin/master' into develop
Baris Usakli e9639833c5 add router.all
Julian Lam 1247b4b53b linting