Commit Graph

1048 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
3a009f96cd fix: closes #10621, convert \r\n to \n so it isn't counted as 2 characters 2022-05-14 20:03:16 -04:00
Barış Soner Uşaklı
323dbc9789 feat: add hook for user invite 2022-05-05 12:43:48 -04:00
Barış Soner Uşaklı
d20b07cfea Webpack5 (#10311)
* feat: webpack 5 part 1

* fix: gruntfile fixes

* fix: fix taskbar warning

add app.importScript
copy public/src/modules to build folder

* refactor: remove commented old code

* feat: reenable admin

* fix: acp settings pages, fix sortable on manage categories

embedded require in html not allowed

* fix: bundle serialize/deserizeli so plugins dont break

* test: fixe util tests

* test: fix require path

* test: more test fixes

* test: require correct utils module

* test: require correct utils

* test: log stack

* test: fix db require blowing up tests

* test: move and disable bundle test

* refactor: add aliases

* test: disable testing route

* fix: move webpack modules necessary for build, into `dependencies`

* test: fix one more test

remove 500-embed.tpl

* fix: restore use of assets/nodebb.min.js, at least for now

* fix: remove unnecessary line break

* fix: point to proper ACP bundle

* test: maybe fix build test

* test: composer

* refactor: dont need dist

* refactor: more cleanup

use everything from build/public folder

* get rid of conditional import in app.js

* fix: ace

* refactor: cropper alias

* test: lint and test fixes

* lint: fix

* refactor: rename function to app.require

* refactor: go back to using app.require

* chore: use github branch

* chore: use webpack branch

* feat: webpack webinstaller

* feat: add chunkFile name with contenthash

* refactor: move hooks to top

* refactor: get rid of template500Function

* fix(deps): use webpack5 branch of 2factor plugin

* chore: tagging v2.0.0-beta.0 pre-release version 💥 :shipit: 🎉 🚀

* refactor: disable cache on templates

loadTemplate is called once by benchpress and the result is cache internally

* refactor: add server side helpers.js

* feat: deprecate /plugins shorthand route, closes #10343

* refactor: use build/public for webpack

* test: fix filename

* fix: more specific selector

* lint: ignore

* refactor: fix comments

* test: add debug for random failing test

* refactor: cleanup

remove test page, remove dupe functions in utils.common

* lint: use relative path  for now

* chore: bump prerelease version

* feat: add translateKeys

* fix: optional params

* fix: get rid of extra timeago files

* refactor: cleanup, require timeago locale earlier

remove translator.prepareDOM, it is in header.tpl html tag

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* feat: allow app.require('bootbox'/'benchpressjs')

* refactor: require server side utils

* test: jquery ready

* change istaller to use build/public

* test: use document.addEventListener

* refactor: closes #10301

* refactor: generateTopicClass

* fix: column counts for other privileges

* fix: #10443, regression where sorted-list items did not render into the DOM in the predicted order [breaking]

* fix: typo in hook name

* refactor: introduce a generic autocomplete.init() method that can be called to add nodebb-style autocompletion but using different data sources (e.g. not user/groups/tags)

* fix: crash if `delay` not passed in (as it cannot be destructured)

* refactor: replace substr

* feat: set --panel-offset style in html element based on stored value in localStorage

* refactor: addDropupHandler() logic to be less naive

- Take into account height of the menu
- Don't apply dropUp logic if there's nothing in the dropdown
- Remove 'hidden' class (added by default in Persona for post tools) when menu items are added

closes #10423

* refactor: simplify utils.params [breaking]

Retrospective analysis of the usage of this method suggests that the options passed in are superfluous, and that only `url` is required. Using a browser built-in makes more sense to accomplish what this method sets out to do.

* feat: add support for returning full URLSearchParams for utils.params

* fix: utils.params() fallback handling

* fix: default empty obj for params()

* fix: remove \'loggedin\' and \'register\' qs parameters once they have been used, delay invocation of messages until ajaxify.end

* fix: utils.params() not allowing relative paths to be passed in

* refactor(DRY): new assertPasswordValidity utils method

* fix: incorrect error message returned on insufficient privilege on flag edit

* fix: read/update/delete access to flags API should be limited for moderators to only post flags in categories they moderate

- added failing tests and patched up middleware.assert.flags to fix

* refactor: flag api v3 tests to create new post and flags on every round

* fix: missing error:no-flag language key

* refactor: flags.canView to check flag existence, simplify middleware.assert.flag

* feat: flag deletion API endpoint, #10426

* feat: UI for flag deletion, closes #10426

* chore: update plugin versions

* chore: up emoji

* chore: update markdown

* chore: up emoji-android

* fix: regression caused by utils.params() refactor, supports arrays and pipes all values through utils.toType, adjusts tests to type check

Co-authored-by: Julian Lam <julian@nodebb.org>
2022-04-29 21:39:33 -04:00
Barış Soner Uşaklı
b9f9164308 fix: #10502, allow unblocking admin/mod
if they were blocked before becoming admin/mod it wasn't possible to unblock them
2022-04-17 18:15:49 -04:00
Barış Soner Uşaklı
767973717b perf: WIP #10449, allow array of pids for posts.purge (#10465)
* perf: WIP #10449, allow array of pids for posts.purge

* refactor: deletePostDiffs

* perf: deletePostFromReplies/deletePostFromGroups

* refactor: upload

* refactor: deleteFromCategoryRecentPosts

deleteFromUsersBookmarks
deleteFromUsersVotes

* feat: closes #10468, add incrObjectFieldByBulk

* refactor: allow nids for notifications.rescind

* refactor: allow uids array for user.updatePostCount

* refactor: rewrite deleteFromTopicUserNotification to work with an array

* feat: deprecate action:post.purge as well

* lint: add missing comma
2022-04-07 14:06:25 -04:00
Barış Soner Uşaklı
be6bbabd0e feat: ability to mute users
new mute privilege
2022-03-11 23:07:20 -05:00
Barış Soner Uşaklı
c8e986d61c refactor: closes #10301 2022-03-11 15:33:28 -05:00
Barış Soner Uşaklı
3414a23bce feat: min:rep:upvote, and other limits similar to downvotes
closes #10380
2022-03-11 13:34:36 -05:00
gasoved
62187caa67 feat: post auto flagging on downvotes #10029 (#10367)
* feat: post auto flagging on downvotes

* fix: just get one admin
2022-03-04 15:38:16 -05:00
Barış Soner Uşaklı
dbf7a45828 fix: #10292, delete missing fields 2022-02-15 19:33:52 -05:00
Julian Lam
d5ed8736aa feat: deleting a user upload dissociates from posts, and vice versa 2022-02-14 15:02:07 -05:00
Julian Lam
8c2752bab1 test: user uploads.js tests 2022-02-14 15:02:07 -05:00
Julian Lam
11275d6809 test: testing user upload methods, already fixed one bug 2022-02-14 15:02:07 -05:00
Julian Lam
b9edee143e fix: local deleteUploads() method in src/user/delete.js to call User.deleteUpload() 2022-02-14 15:02:07 -05:00
Julian Lam
7ef9c7d220 refactor: .deleteUpload() to accept array of paths 2022-02-14 15:02:07 -05:00
Julian Lam
ea36016d87 refactor: fix user uploads paths, and associate uid with user uploads 2022-02-14 15:02:07 -05:00
Julian Lam
6489e9fd9e refactor: change the post uploads' hash seeds to have the files/ prefix 2022-02-14 15:02:07 -05:00
Julian Lam
6aae2e5d89 Revert "fix: proactively guard against homograph characters in website values"
This reverts commit fa7dcdb968.
2022-02-11 14:12:22 -05:00
Barış Soner Uşaklı
489c0d3015 refactor: remove extra zset remove, closes #10277 2022-02-11 10:43:40 -05:00
Barış Soner Uşaklı
7f1c4477e3 feat: allow gif profile images, sharp 0.30.0 supports gifs 2022-02-02 21:27:33 -05:00
Julian Lam
fa7dcdb968 fix: proactively guard against homograph characters in website values 2022-02-01 10:25:36 -05:00
Julian Lam
165a1d8b76 Revert "fix: update usage of emailer.send to not catch (as errors are no longer thrown), email error throttler"
This reverts commit d4e5259fcf.
2022-01-28 15:41:27 -05:00
Julian Lam
d4e5259fcf fix: update usage of emailer.send to not catch (as errors are no longer thrown), email error throttler 2022-01-28 15:16:41 -05:00
Magnus
7bd3e31dec Fullname in notifications (#10157)
* 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
2022-01-19 10:19:11 -05:00
Barış Soner Uşaklı
d1eb21c56d fix: #10173, don't show optional message if email is required 2022-01-16 18:34:05 -05:00
Julian Lam
6ca216ab6e feat: revoke user sessions on successful password reset 2022-01-12 11:09:02 -05:00
Julian Lam
be4dbe3441 chore: org; merge consecutive await calls into one Promise.all 2022-01-12 11:08:34 -05:00
Julian Lam
ffdf26afef docs: comment hint :shipit: 2022-01-11 13:54:02 -05:00
Barış Soner Uşaklı
1e60ae8703 refactor: change error message 2021-12-15 21:32:30 -05:00
Barış Soner Uşaklı
1264dcb555 test: add email interstitial tests 2021-12-15 21:28:46 -05:00
Barış Soner Uşaklı
a8afdc6019 fix: #10069, don't modify fields array
use a single setObjectFields for the profile update
2021-12-08 18:38:02 -05:00
Barış Soner Uşaklı
9627fa9029 refactor: always returns array 2021-12-07 18:43:14 -05:00
Barış Soner Uşaklı
830166d120 fix: #10067, count posts instead of incr/decr 2021-12-07 18:40:23 -05:00
Barış Soner Uşaklı
2473d5d873 fix: #10027, properly auto confirm first user 2021-11-22 23:20:31 -05:00
Barış Soner Uşaklı
fb363957d1 refactor: tab rules 2021-11-18 16:42:18 -05:00
Julian Lam
09e0c6d503 feat: add feature flag to disable verification emails, closes #9996 2021-11-12 14:58:56 -05:00
Julian Lam
c1ac291284 fix: ability to enumerate email via updateProfile method 2021-11-08 15:36:37 -05:00
Julian Lam
b912a564e3 fix: accidentally not clearing email when said email is confirmed for a different uid 2021-11-08 15:16:48 -05:00
Julian Lam
6b4f35c2fa feat: new plugin hook to allow plugins to reject email address on new registration or email change 2021-10-22 15:06:51 -04:00
Barış Soner Uşaklı
90b81262fa refactor: remove unused var 2021-10-19 12:38:40 -04:00
Barış Soner Uşaklı
9cb4de50a2 fix: biweekly digest #8053 2021-10-19 12:21:54 -04:00
Barış Soner Uşaklı
8e319a9b25 refactor: catch errors from digest 2021-10-18 20:17:35 -04:00
Barış Soner Uşaklı
f7967bdf68 feat: #8053, biweekly digest option 2021-10-18 20:10:14 -04:00
Barış Soner Uşaklı
a9bc6a0962 refactor: allow array of uids for blocks.is/list
remove async.filter
use cacheCreate
2021-10-16 13:09:14 -04:00
Barış Soner Uşaklı
f24b630e1a feat: add userData to static:user.delete 2021-09-29 09:38:31 -04:00
Julian Lam
58e0a366c8 fix: #9834, missing null email check on new registrations, added tests 2021-09-24 12:15:40 -04:00
Barış Soner Uşaklı
c4fc7bf9b5 fix: #9818, fix totalTime calculation 2021-09-21 10:21:52 -04:00
Barış Soner Uşaklı
05ddd60c5e dont check empty emails in queue 2021-09-18 15:20:24 -04:00
Barış Soner Uşaklı
7f48edc02a feat: add uid to filter:user.saveSettings 2021-09-09 22:24:55 -04:00
Julian Lam
006fc700dd feat: add ACP option to require email address on new registration 2021-09-08 14:18:20 -04:00