Commit Graph

279 Commits (aafb7f6ec752ef2c5c852156732fbb294c7aa9fe)

Author SHA1 Message Date
Barış Soner Uşaklı 3c85b944e3 feat: allow groups to be exempt from maintenance mode
closes 
Julian Lam 9b753d6d57
TTL Cache ()
* refactor: move src/cacheCreate.js to src/cache/lru.js

* fix: call new library location for lru cache creator

* feat: add ttl cache

* fix: update upload throttler to use ttl cache instead of lru cache

* chore: add missing dependency

* fix: avoid pubsub conflicts

* fix: use get instead of peek, which is not available in ttl-cache
Julian Lam c07d595662
Update to lru-cache@^7 ()
* chore(deps): bump lru-cache from 6.0.0 to 7.13.1 in /install

Bumps [lru-cache](https://github.com/isaacs/node-lru-cache) from 6.0.0 to 7.13.1.
- [Release notes](https://github.com/isaacs/node-lru-cache/releases)
- [Changelog](https://github.com/isaacs/node-lru-cache/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-lru-cache/compare/v6.0.0...v7.13.1)

---
updated-dependencies:
- dependency-name: lru-cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(lru-cache): remove unneeded `length` params for cache creation, as `maxSize` was not used in those init calls, also renamed some methods to match new method names in lru-cache [breaking]

Added deprecation notices for old params

* fix: replace three direct calls to lru-cache with call to cacheCreate, moved cache creation call in uploads to run on first init as config is not populated at lib init

* test: move configs init above cache reset calls in databasemock

* move some more code above cache clear

* refactor: remove unused

* test: lru

* test: more debug

* test: on more test

* use await helpers.uploadFile

* fix: tests remove logs

* fix: acp cache page

* fix: add in one more guard again cache instantiation with `length` prop but no `maxSize` prop

* fix(deps): bump markdown

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
Barış Soner Uşaklı 2a89ad8288 fix: use escaped group names in invite modal
Magnus 7bd3e31dec
Fullname in notifications ()
* init - fullname notifications setting

* fullname in topic reply

* fullname for group-request-membership

* fullname for group-leave notification

* fullname for new-post-flag & new-user-flag

* removed log

* fullname for user follow

* fullname in message notification

* fullname in follow

* fullname for sendNotificationToPostOwner

* fullname in sendNotificationToTopicOwner

* fullname in doExport

* shorthand name set

* shorter name set

* fullname in notifications

* displayname for notifications

* removed unused require
Barış Soner Uşaklı d9c42c000c feat: show 10 members
Barış Soner Uşaklı fb363957d1 refactor: tab rules
Barış Soner Uşaklı d196409580 refactor: remove more async.eachSeries/mapSeries
psychobunny ae793b4a44 chore: found some hooks that don't play well docgen
gasoved 8168c6c407
fix: purge uploaded images accordingly ()
* fix: purge uploaded images accordingly

* fix: tests

* fix: relative paths
Barış Soner Uşaklı 90d64fe1df fix: , crash on post flag
Barış Soner Uşaklı 4327a09d76
feat: allow optional fields argument on db.getObject(s) ()
Peter Jaszkowiak cc9d6fd08b chore: eslint max-len
Peter Jaszkowiak 23f212a4c0 chore: eslint prefer-destructuring
Peter Jaszkowiak 62869bae3d chore: eslint function-paren-newline
Peter Jaszkowiak dab3b23575 chore: eslint no-var, vars-on-top
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback
Peter Jaszkowiak 707b55b6a5 chore: eslint prefer-template
Barış Soner Uşaklı 47299ea587
Categories refactor ()
* feat: wip categories pagination

* feat: add subCategoriesPerPage setting

* feat: add load more sub categories button to category page

* fix: openapi spec

* feat: show sub categories left on category page

hide button when no more categories left

* breaking: rename categories to allCategories on /search

categories contains the search results

* fix: spec

* refactor: remove cidsPerPage

* fix: tests

* feat: use component for subcategories

* fix: prevent negative subCategoriesLeft

* feat: new category filter/search WIP

* feat: remove categories from /tag

* fix: dont load all categories when showing move modal

* feat: allow adding custom categories to list

* breaking: dont load entire category tree on post queue

removed unused code
add hooks to filter/selector
add options to filter/selector

* feat: make selector modal work again

* feat: replace old search module

* fix: topic move selector

* feat: dont load all categories on create category modal

* fix: fix more categorySelectors

* feat: dont load entire category tree on group details page

* feat: dont load all categories on home page and user settings page

* feat: add pagination to /user/:userslug/categories

* fix: update schemas

* fix: more tests

* fix: test

* feat: flags page, dont return entire category tree

* fix: flag test

* feat: categories manage page

dont load all categories
allow changing root category
clear caches properly

* fix: spec

* feat: admins&mods page

dont load all categories

* fix: spec

* fix: dont load all children when opening dropdown

* fix: on search results dont return all children

* refactor: pass all options, rename options.cids to options.selectedCids

* fix: 

* fix: index 0

* fix: spec

* feat: , add setObjectBulk

* refactor: shoter updateOrder

* feat: selectors on categories/category

* fix: tests and search filter

* fix: category update test

* feat: pagination on acp categories page

show order in set order modal

* fix: allow drag&drop on pages > 1 in /admin/manage/categories

* fix: teasers for deep nested categories

fix sub category display on /category page

* fix: spec

* refactor: use eslint-disable-next-line

* refactor: shorter
gasoved 53e0d4d2e0 feat: banned-users group
Barış Soner Uşaklı 89e6c75d58 fix: , fix string boolean values
Julian Lam 5b8558e9a5 feat: allow dashes in privilege group names
Julian Lam 32e36f7b2e feat(api): group ownership API route, switch client-side to use API route
Julian Lam 1cd2689cf6 refactor(api): deprecated groups update socket in favour of API lib
Julian Lam 600807fbe1 fix: don't return deleted: 0 for ephemeral groups
psychobunny 53abada5f0 Revert "feat: option to allow auto-joining of groups (optionally skip the "request membership" step)"
This reverts commit 685f3c6aa6.
psychobunny 685f3c6aa6 feat: option to allow auto-joining of groups (optionally skip the "request membership" step)
Barış Soner Uşaklı f7c738deda fix: , don't send notifications if uids already in group
Julian Lam 6e2da9966e refactor: move plugin hook methods to plugin.hooks.*
Barış Soner Uşaklı 8d060065a0 fix: spec
gasoved 3ccebf112e
feat: invites regardless of registration type, invite privilege, groups to join on acceptance ()
* feat: allow invites in normal registration mode + invite privilege

* feat: select groups to join from an invite

* test: check if groups from invitations have been joined

* fix: remove unused variable

* feat: write API versions of socket calls

* docs: openapi specs for the new routes

* test: iron out mongo redis difference

* refactor: move inviteGroups endpoint into write API

* refactor: use GET /api/v3/users/:uid/invites/groups

Instead of GET /api/v3/users/:uid/inviteGroups

* fix: no need for /api/v3 prefix when using api module

* fix: tests

* refactor: change POST /api/v3/users/invite

To POST /api/v3/users/:uid/invites

* refactor: make helpers.invite awaitable

* fix: restrict invite API to self-use only

* fix: move invite groups controller to write api, +tests

* fix: tests

Co-authored-by: Julian Lam <julian@nodebb.org>
Julian Lam 8518404e22
feat: allow groups to specify which cids to show member posts from ()
* feat: allow groups to specify which cids to show member posts from

* docs: fix tests for openapi

* fix: test breakage caused by improper conditional

* feat: server-side checking of memberPostCids for validity

* feat: admin panel template update to select categories to include

* refactor: privilege helpers.isUserAllowedTo

... to helpers.isAllowedTo, allowing group names to be passed in
Barış Soner Uşaklı f1f9b225b0
feat: , cache refactor ()
* feat: , cache refactor

ability to disable caches
ability to download contents of cache
refactor cache modules to remove duplicated code

* fix: remove duplicate hit/miss tracking

check cacheEnabled in getUncachedKeys
Barış Soner Uşaklı 08ff4041aa fix: missing await
Barış Soner Uşaklı b26e9b5993 fix: , dont save escaped data when renaming groups
Barış Soner Uşaklı 872bacf1c4
Admin/users ()
* feat: wip admin/users

* feat: more work

* feat: more fixes

* feat: , verified/unverified user groups

* feat: add filter

* feat: change user search to use filters array

* refactor: remove unused search call

* fix: tests

* fix: cant join system groups

* fix: upgrade script
Barış Soner Uşaklı dc29f4dca2 refactor: switch to using slugify module
Julian Lam 952dc211dd feat(writeapi): added group joining and deletion
Julian Lam ba345e53e8 feat(writeapi): added POST /api/v1/groups
Barış Soner Uşaklı f1e82b6441 feat: add filter:group.getOwnersAndMembers
Barış Soner Uşaklı f1974fb900 refactor: pass only needed data
Barış Soner Uşaklı f89ec20574 feat: allow passing groupName to user.search
Barış Soner Uşaklı 9df871bee2 fix: tests
Barış Soner Uşaklı 7331faed9f fix: reverse uid checks
Barış Soner Uşaklı ce6b20c4b7 feat: remove topics.async.getTopicData usage
Barış Soner Uşaklı e80379dc0e feat: display stack trace on winston.error
Barış Soner Uşaklı af790e3f5e refactor: shorter code
Barış Soner Uşaklı a024cc1344
fix: whitespace
Barış Soner Uşaklı 0595e71078
fix: typo
Barış Soner Uşaklı 89b010249d
fix: , clear group member cache when group is renamed