199 Commits (2ceda70a97954ef69076ae4e61267b700de5e749)

Author SHA1 Message Date
Barış Soner Uşaklı 37b6b8fd48 fix: upgrade script to unescape navigation titles 5 years ago
Barış Soner Uşaklı 8627bee541 fix: #8386, use backgroundImage everywhere 5 years ago
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
5 years ago
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
5 years ago
Barış Soner Uşaklı 6a5e86dc66 fix: #8305, don't use null values 5 years ago
Barış Soner Uşaklı 5ebcdb1806 fix: #8287, fix users:flags as well 5 years ago
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
5 years ago
Barış Soner Uşaklı e52ecfaf3f fix: don't touch objects that don't have the required fields 5 years ago
Barış Soner Uşaklı d72b0d1616 fix: delete follower/followingCount as well 5 years ago
Barış Soner Uşaklı 75bcb0f484 fix: remove unused data from post/topic/user hashes 5 years ago
Barış Soner Uşaklı 38322ec308 fix: #7949, delete old user notifs 5 years ago
Baris Usakli a651d154ce fix: #7921, dont create wrong entries in db for flag
upgrade script to remove wrong entries
5 years ago
Opliko b9583ed838 Add privilege for accessing user information (#7859)
* Add view users info global privilege

* Show user ip only to global mods and admins

* fix missing comma

* Hide link for users without correct privilege

* move getting privilege information to getAllData

* Hide the link from Global Moderators as well

* Give Global Moderator view:users:info privilege

* Restrict ip in post menu to view:users:info

* add some trailing commas....

* Add privilege to categories test

* Add group privilege to categories test

* add upgrade script

* fix style for TravisCI

* more styling - change spaces to tabs

* some more styling fixes (hopefully final one)

* fix style for Travis CI

* hide ip in chat messages

* Don't show even hidden ips on user profile page
5 years ago
Baris Usakli accf48f38b fix: upgrade script #7720 6 years ago
Barış Soner Uşaklı 23fb904fa6 feat: removed series from upgrade script 6 years ago
Barış Soner Uşaklı a39f0ef592 fix: #5570, create per category user post zsets 6 years ago
Barış Soner Uşaklı 5fa5e999f8
Plugin metrics (#7626)
* feat: add enable/disable checkbox for plugin usage

* feat: submit plugin data to packages.nodebb.org

only submit in production mode
submit once every 24 hours
dont submit for plugins that have "private": true in plugin.json
enabled on new installs
disabled on existing installs

* fix: hash not working after first send

fix statusCode

* fix: remove url

* feat: show compatibilty

* feat: add install question for submit plugin usage
6 years ago
Barış Soner Uşaklı 4b843ba16f fix: #7567, allow invite and approval at the same time 6 years ago
Barış Soner Uşaklı 8aef689f05 fix: no need for moderate bit for global mods and admins 6 years ago
Barış Soner Uşaklı 035f624758
Remove implicit mod privs. closes #6345 (#7648)
* feat: add upgrade script to give mods privs

* feat: give all privileges when making a moderator

* feat: remove implicit privs

* feat: give global mods default privs

* feat: more priv fixes

* feat: use lodash

* fix: remove implicit mod priv from topic delete

* fix: more privs

* fix: posts.canEdit

* fix: canDelete and canEdit

* fix: tests, remove console.log

* feat: shorter functions

* feat: add tests

* fix: uids

* fix: redis random test fail
6 years ago
Barış Soner Uşaklı 4d9bc30d1f
feat: async3 upgrade (#7639)
* feat: async3 upgrade WIP

* fix: async.doWhilst

* fix: async early exit

* fix: psql doUntil

* fix: psql again
6 years ago
Barış Soner Uşaklı 172e688805 fix: handle missing timestamps 6 years ago
Barış Soner Uşaklı 3d938e7bf8 fix: increase batch size 6 years ago
Barış Soner Uşaklı 4f3ca4d899 fix: upgrade script date 6 years ago
Baris Usakli ed91d3f2c8 fix: #7519 6 years ago
Barış Soner Uşaklı fddb783ee9 fix: #7487 6 years ago
Julian Lam 697a6597f3
fix: #7444 Re-factor handling of og:image tags (#7463)
* fix: display proper site logo or og-image with sizes in head

* fix: refactor og:image logic, #7444

- Updated logic to set additional og:image tags based on more
  factors
- logo.png fallback

* feat: save image sizes on post upload, re: #7444

* fix: awaiting addTags in topic controller

* fix: pass strings to meta tags object

* fix: sending absolute image url to meta tag

* fix: removed unneeded async and requiring sync db

* feat: upgrade to calculate image sizes for all post uploads tracked

* fix: tests
6 years ago
Baris Usakli 8c68780e54 fix: #7350 6 years ago
Barış Soner Uşaklı c72da5595a fix: #6806
3 new global privileges
view:users
view:tags
view:groups
6 years ago
Barış Soner Uşaklı 9d1fcf4e36 fix: closes #7217 6 years ago
Barış Soner Uşaklı 0eef3e1c27 fix: upgrade script key 6 years ago
Barış Soner Uşaklı eb7ae54f81
Category watch state (#7109)
* feat: wip, category watch change

* feat: pass data to client

* feat: allow changing state

* fix: account page categories

* fix: show in unread if topic is followed or category is watched

* feat: add default watch state to acp

* feat: save user category watch state

* feat: update unread recent pages

* fix: remove dupe code

* fix: flip conditions

* fix: handle empty arrays

* fix: ignore/watch on others profile

* feat: upgrade script for category states

if there are any users ignoring categories set their state in new zset and delete cid:<cid>:ignorers

* fix: upgrade

* fix: tests

* fix: redis count

* fix: more tests
6 years ago
Barış Soner Uşaklı 263c918088
feat: remove uid:<uid>:ignored:cids (#7099)
use cid:<cid>:ignorers instead
6 years ago
Barış Soner Uşaklı c72299ad71 refactor widgets admin
so we dont load the widget-settings.tpl in the upgrade script and only load areas
6 years ago
Barış Soner Uşaklı 21402ba803 check joindate 6 years ago
Barış Soner Uşaklı c593ffd75f
closes #6944 6 years ago
Barış Soner Uşaklı b6771836cf closes #6937 6 years ago
Barış Soner Uşaklı 4724901588 use series 6 years ago
renovate[bot] 64b9dabff8 chore(deps): update dependency eslint-config-airbnb-base to v13 (#6599)
* chore(deps): update dependency eslint-config-airbnb-base to v13

* chore: #6599, linting 😬
6 years ago
Barış Soner Uşaklı 9c03881d5a add threshold for image resizing 6 years ago
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
6 years ago
Barış Soner Uşaklı 54c638c3c8 fix upgrade script for notification types 6 years ago
Barış Soner Uşaklı 5c7dd54815
fix zsets and update them on post move, closes #6823 (#6827) 6 years ago
Barış Soner Uşaklı 49ba5af5fa
closes #6810 (#6813) 6 years ago
Barış Soner Uşaklı f45d24d351
change if to !== 0 6 years ago
Barış Soner Uşaklı 77beaf2e15
Allow local login,closes #6800 (#6803)
* WIP

* reset groups cache after every suite
6 years ago
Barış Soner Uşaklı 18d0deeccb
update deprecated methods (#6794) 6 years ago
Barış Soner Uşaklı 95501e8fee
closes #6738 closes #6290 (#6785)
* closes #6738 closes #6290

* fix test, delete keys

* delete all bans on user delete

* fix upgrade script to actually read reason
6 years ago
Barış Soner Uşaklı 7787c9b4bb
fix wrong year on upgrade script 6 years ago
Barış Soner Uşaklı 24601694db
fix wrong year on upgrade script 6 years ago
Barış Soner Uşaklı b7ead6dc9c
Replace jimp with sharp (#6774)
* 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
6 years ago
Ben Lubar 97a3079bc0 Optimize PostgreSQL session store.
- Sets session ID to be a constant-sized character field inline in the
  table instead of a variable-length character field compressed outside
  of the row.
- Changes the session data from "json" to "jsonb" which is faster and
  smaller on disk with the drawback of not maintaining key order and
  whitespace (which we don't care about at all)
- Adds a clustered index on the session expiration timestamp, which will
  make periodic session purging much faster.

(For an example, WTDWTF currently has 482355 sessions in the table, and
 because there is no index on the expiration timestamp, PostgreSQL must
 check all the rows in the table every time.)

This upgrade script can run concurrently with a live NodeBB instance,
but any action that touches sessions will wait until the upgrade script
is done.

Does not touch the database if the database driver is not set to
PostgreSQL or if there is a Redis database configured.
7 years ago
Julian Lam c1725442ea added progress bar to username_email_history upgrade script 7 years ago
Julian Lam 1e3cdc99ac fixes #6702 7 years ago
Ben Lubar 33228bb7fe PostgreSQL database driver (#5861)
* [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.
7 years ago
Julian Lam 48197e2d25 this upgrade script was written in 2018, not 2017, heh 7 years ago
Julian Lam 002cde1057 added progress bar to ip hash upgrade script 7 years ago
Julian Lam 6485fc3129 removing extra console logging #6596 7 years ago
Julian Lam 68c9c8c5d9 fixes #6596 7 years ago
Dravere 17e7fe3070 Fixed wrong callback given to groups.join 7 years ago
Julian Lam cb3b2bd27b closes #6562 7 years ago
Julian Lam 99dc3feeb2 Edit history is now a category-level privilege
Closes #6425
7 years ago
Barış Soner Uşaklı 4f4290b15d rename upgrade folder 7 years ago
Barış Soner Uşaklı a7267df404 closes #6464 7 years ago
Barış Soner Uşaklı 9ae5946e7a Merge remote-tracking branch 'refs/remotes/origin/master' into develop 7 years ago
Barış Soner Uşaklı 14914b7610 handle missing config.json 7 years ago
Julian Lam 360fb69723 upload script for #6455, @psychobunny 7 years ago
Barış Soner Uşaklı 0070f5c1b2 Merge remote-tracking branch 'refs/remotes/origin/master' into develop 7 years ago
Julian Lam 5d2e6f0e8e Squashed commit of the following:
commit 7bd46afad7033a466626826d3e29610f41328510
Author: Julian Lam <julian@nodebb.org>
Date:   Thu Mar 15 15:41:36 2018 -0400

    fixes #6363

commit 4b755d5801b2f6d70cea10516f88392708c72f61
Author: Julian Lam <julian@nodebb.org>
Date:   Thu Mar 15 15:24:12 2018 -0400

    fixes #6362

commit 6035e75453a08aee0fef7ff59d57dd5c1e8f4ac9
Author: Julian Lam <julian@nodebb.org>
Date:   Thu Mar 15 15:07:23 2018 -0400

    Fixes #6361
7 years ago
Barış Soner Uşaklı e1c6761087 closes #6258 7 years ago
Julian Lam c25d752573 Merge remote-tracking branch 'origin/master' into develop 7 years ago
Julian Lam 52678621f9 revising minimum password strength to be 1 instead of 0 7 years ago
Barış Soner Uşaklı 225af93b9e closes #6329 7 years ago
Julian Lam 1ce448f2a1 Merge remote-tracking branch 'origin/master' into develop 7 years ago
Barış Soner Uşaklı fa0328fe35 fix my copy paste fail 7 years ago
Barış Soner Uşaklı 708fda9372 use old settings if available 7 years ago
Barış Soner Uşaklı 723f31a362 closes #6323 7 years ago
Barış Soner Uşaklı ac1f7eefe5 closes #2304 7 years ago
Julian Lam fad0c5f2d5 moved 1.8.0 upgrade scripts to 1.7.4 where they were actually released 7 years ago
Barış Soner Uşaklı 8ceb102ed3 closes #6274 7 years ago
Julian Lam 947c81adf0 @pitaj wut 7 years ago
Julian Lam f6ad344ac6 Fixes #6259
Fixed issue that would cause the upgrade script to completely
wipe your customJS. This was caused by meta.config not being
populated during upgrade scripts (but only when run with
./nodebb upgrade... odd.)
7 years ago
Barış Soner Uşaklı 4dee5a6101 delete expireAt field 7 years ago
Barış Soner Uşaklı 72140e5338 closes #5991, closes #5884 7 years ago
Baris Usakli ecf6c0f3ec closes #4652 7 years ago
Barış Soner Uşaklı ba56810790 upgrade script fixes 7 years ago
Barış Soner Uşaklı 9d7e0775aa closes #6214 7 years ago
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
7 years ago
Baris Usakli 025709499c more fixes 7 years ago
Baris Usakli 63b9255fa1 Merge remote-tracking branch 'refs/remotes/origin/master' into chat-permission 7 years ago
Barış Soner Uşaklı ea8cf6545c change db.set/get to use data field instead of value 7 years ago
Baris Usakli 4a73621dca chat privilege 7 years ago
Barış Soner Uşaklı 43180d4b83 #6158 7 years ago
Peter Jaszkowiak fc19f3af61 Misc fixes and improvements (#6143)
* `setup` command fixes and improvements

- Enable using the `./nodebb setup` command for auto-setup with a JSON argument
- Change CLI so package-install and dependency install are separate steps
- Fix #6142

* Prevent compiling templates multiple times

- Multiple requests for same template get pooled
- Hopefully fixes the "templateFunction is not a function" error which happens if site is restarted during high-traffic times

* More helpful upgrade template
7 years ago
Barış Soner Uşaklı dd176dd5f2
Notification delivery (#6072)
* ability for users to choose how they receive notifications

add type field to more notifications, the type field is used to
determine what to do based on user
setting(none,notification,email,notificationemail)

* change var name to types

* cleanup

* add event types for privileged users

* remove unused language keys

* fix uids check

* changed if statements

* upgrade script to preserver old settings
7 years ago
Baris Usakli 43bec4cb45 Merge remote-tracking branch 'refs/remotes/origin/master' into develop 7 years ago
Baris Usakli 6778cce265 add new zset 7 years ago
Julian Lam 9cbf1597cd Merge remote-tracking branch 'origin/master' into develop 7 years ago
Julian Lam cd6dcff38b Split up customJS into customHTML and customJS for better organisation (#5981)
* WIP

* fixed customJS not actually working in footer

* Moving scripts to footer, #5980

* Added upgrade scripts for #5980
7 years ago
Barış Soner Uşaklı 410e825bc0 fix upgrade script changing brand:logo to absolute path 7 years ago