Commit Graph

932 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
ec5582b53c feat: add privilege give/rescind hooks (#8336)
* feat: add privilege give/rescind hooks

action:privileges.categories.give/rescind
action:privileges.global.give/rescind

breaking change, privileges.categories.give/rescind and privileges.global.give/rescind use full privilege name for groups ie `groups:find` instead of `find`

* fix: tests, privileges renamed
2020-05-26 21:57:38 -04:00
Barış Soner Uşaklı
3b6d57e497 refactor: move code 2020-05-21 22:20:01 -04:00
Barış Soner Uşaklı
4ee3543ea4 feat: tweak intersection code, add tests 2020-05-21 22:12:58 -04:00
Julian Lam
6f504c4142 Remove allowFileUploads ACP option (#8324)
* feat: allow awaitable upgrade scripts

* feat: allowFileUploads removal upgrade script

* refactor: remove unnecessary ACP option `allowFileUploads`

* fix: updated upgrade script template to not use callback arg

* fix: upgrade script as per @baris

* fix: add missing await

* fix: add missing await
2020-05-21 16:06:35 -04:00
Barış Soner Uşaklı
f2907908c9 fix: another test fix 2020-05-20 09:08:27 -04:00
Barış Soner Uşaklı
feb748a44d fix: tests 2020-05-20 08:55:07 -04:00
Barış Soner Uşaklı
12c6bc2e07 feat: convert queries so they used indices directly 2020-05-19 00:22:54 -04:00
Barış Soner Uşaklı
7a801abade fix: tests on redis 2020-05-16 22:49:34 -04:00
Barış Soner Uşaklı
a032e12b7e fix: tests 2020-05-16 00:25:44 -04:00
Barış Soner Uşaklı
81e33b9391 fix: #8317 2020-05-15 22:10:50 -04:00
Barış Soner Uşaklı
bfad457275 feat: add methods for adding/removing tags from topics 2020-05-12 23:00:45 -04:00
Barış Soner Uşaklı
97c086aba9 fix: missing await 2020-05-12 12:18:30 -04:00
Barış Soner Uşaklı
edf9fe3b7f feat: add null tests for sorted sets 2020-05-09 10:38:56 -04:00
Barış Soner Uşaklı
aad0880f7c feat: add filter:categories.getRecentTopicReplies
pass req.query to getRecentTopicReplies
2020-05-08 22:36:16 -04:00
Barış Soner Uşaklı
a969c5cec9 feat: allow activating additional plugins for testing via config.json 2020-05-06 13:57:03 -04:00
Barış Soner Uşaklı
3a23ddaba5 feat: move plugin tests to separate file 2020-05-04 14:23:45 -04:00
Barış Soner Uşaklı
a6bb9f4364 fix: #3321, run plugin tests for installed plugins 2020-05-03 22:59:03 -04:00
Barış Soner Uşaklı
3d0db9630f fix: remove deprecated mocha.opts 2020-05-03 22:55:50 -04:00
Barış Soner Uşaklı
9d153fd388 fix: #8287, dont readd user after deletion
don't add user uid back to users:* sorted sets if they are deleted
upgrade script to fix users:* sorted sets
2020-05-02 13:27:16 -04:00
Barış Soner Uşaklı
0391856d7d fix: #8286, rescind notif when its resolved/rejected 2020-05-01 13:32:20 -04:00
Julian Lam
ccc6118d30 Testing suite integration for openapi spec (#8263)
* feat: testing suite integration for openapi spec

The testing suite now takes the openapi spec into account. It will
check each route defined, make a call to it, and compare the
response with the defined schema. Any mismatches will cause the
test to fail.

* fix(openapi): removed debug stuff from tests

* fix(openapi): fixed some tests

* fix(openapi): added additional check to tests, test fixes

* fix(openapi): better tests, fixed spec errors

* fix(openapi): bad conditional in test

* fix: oops

* fix(openapi): more tests fixing

* fix(openapi): more tests

* fix(openapi): fix some more tests

* fix: verbose'd an info log

* fix: topic pagination route returns schema-optimized pagination block

* fix(openapi): more test/spec fixes

* fix(openapi): accidentally sending in authenticated jar for anon routes

* fix(openapi): more test/spec fixes

* fix(openapi): more spec fixes

* fix: timestampReadable Invalid Date

* fix(openapi): more tests... almost there

* fix(openapi): more tests fixing

* fix(openapi): finally all tests passing

* fix(openapi): added reverse test to compare response to spec

... and fixed all the tests that broke

* fix: remove tests related to group covers, as route is gone

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): object cache is not present for psql

* fix: tests

Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
2020-04-23 21:50:08 -04:00
Julian Lam
6edf02d4a5 fix: remove upload picture test (avatars) 2020-04-23 19:57:41 -04:00
Julian Lam
442fe65f5a fix: remove tests related to group covers, as route is gone 2020-04-23 19:47:39 -04:00
Julian Lam
8387178b25 feat(openapi): merging openapi-test branch into master 2020-04-16 20:39:15 -04:00
Barış Soner Uşaklı
8e23dec84b fix: lint 2020-04-01 21:57:28 -04:00
Barış Soner Uşaklı
e72a29b3fd fix: return null if field does not exist 2020-02-24 18:07:51 -05:00
Andrew Rodrigues
3c9689a5ac feat: settings sorted list (#8170)
* feat: settings sorted list

see https://github.com/NodeBB/nodebb-plugin-quickstart/pull/9/files for sample
2020-02-21 12:18:09 -05:00
Barış Soner Uşaklı
067034082f fix: #6422, update deleted/restored messages 2020-02-14 23:26:54 -05:00
Barış Soner Uşaklı
4d0636f847 fix: #8163, prevent account deletion 2020-02-13 11:31:20 -05:00
Julian Lam
d6e3f3f058 fix: #8142, broken site if no server-side session (#8148)
* fix: #8142, broken site if no server-side session

During the `addHeader` middleware, a check is now done to see if
`req.session.meta` is present. This value is only present if the user
has a valid server-side session.  If it is missing, then it is probably
safe to assume that the server-side session was deleted (either
intentionally or accidentally). In that scenario, the client-side cookie
should be cleared.

Also, there was an issue where the sessionRefresh flag was never cleared
after a successful login, so that was fixed too.

* feat: exported method to get cookie config

* fix: don't clear cookie if cookie is being set

* fix: socket.io tests

Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
2020-02-06 15:52:37 -05:00
Baris Usakli
87225a90c3 fix: #8134, upgrade mkdirp to 1.0.x 2020-01-31 14:10:00 -05:00
Barış Soner Uşaklı
8c48f94b96 fix: #8139, dont allow restore if not deleted by self 2020-01-28 13:03:58 -05:00
Barış Soner Uşaklı
66febb8071 feat: add test for isOnline 2020-01-26 21:51:05 -05:00
Barış Soner Uşaklı
df2c785127 feat: add test for change post owner 2020-01-24 15:24:01 -05:00
Barış Soner Uşaklı
23810cc64b fix: #8133, check if user is in room before removing 2020-01-23 22:40:14 -05:00
Baris Usakli
418c174d56 fix: dont return flag data to client 2020-01-23 12:48:21 -05:00
Barış Soner Uşaklı
51236df4ed fix: check if user has read priv before flagging 2020-01-22 12:14:50 -05:00
Barış Soner Uşaklı
1f13ab8a19 fix: restrict getUsersInRoom to members 2020-01-22 11:46:26 -05:00
Julian Lam
ecc579a29c fix: tests for messaging 2020-01-21 14:35:50 -05:00
Barış Soner Uşaklı
1b08f37612 fix: tests, was using hardcoded message id 2020-01-20 11:15:26 -05:00
Barış Soner Uşaklı
bfaba89557 Merge branch 'master' of https://github.com/NodeBB/NodeBB 2020-01-20 10:59:22 -05:00
Julian Lam
8e5a2276af feat: check flag values on save (assignee and state) (#8122)
* feat: add assignee checking when updating flag

Prior to this, it was possible to update the assignee to any value (or
any user. This commit adds checking to allow only admins, global
moderators, or in the case of flagged posts, moderators.

Also some prep work was added for value checking `state`.

* feat: value checking `state` on flag update

The state should be one of the constants defined earlier in the file.
2020-01-20 10:19:23 -05:00
Barış Soner Uşaklı
6a63c1a100 fix: escape system message, don't allow editing system messages 2020-01-19 22:20:43 -05:00
Barış Soner Uşaklı
8c6a7954cf fix: delete upload 2020-01-19 14:57:06 -05:00
Barış Soner Uşaklı
01d1ae78c8 fix: #8120, bubble errors from static hooks 2020-01-17 13:30:57 -05:00
Barış Soner Uşaklı
3e52557689 fix: change owner missing await 2020-01-17 11:16:23 -05:00
Barış Soner Uşaklı
e06c1bfcd2 fix: escape config.userLang/acpLang, don't allow invalid language codes 2020-01-13 12:27:50 -05:00
Barış Soner Uşaklı
61da8c29ac fix: group create/join/update name validation 2020-01-07 15:40:54 -05:00
Barış Soner Uşaklı
10989cccaa fix: meta description missing if url doesn't have post index 2019-12-30 22:19:00 -05:00
Barış Soner Uşaklı
9d074731f4 fix: login with weak password 2019-12-26 20:17:54 -05:00