Commit Graph

962 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
f9d6912b4a refactor: async/await file 2019-09-23 22:30:17 -04:00
Barış Soner Uşaklı
96ab8d05aa fix: only allow png/jpg/bmp in cover/profile images 2019-09-21 23:10:49 -04:00
Baris Usakli
ecf39727cc fix: #7912 2019-09-20 11:44:49 -04:00
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
2019-09-17 14:02:52 -04:00
Barış Soner Uşaklı
de4619689b fix: change params 2019-09-17 09:12:45 -04:00
Julian Lam
1796b65d34 feat: option to restrict group leaving, closes #7770 2019-09-05 12:01:42 -04:00
Julian Lam
30a86ed553 fix: #7853, dissociation on post purge 2019-09-04 16:59:04 -04:00
Barış Soner Uşaklı
aea04de094 feat: update LESS to v3.x, #7855 (#7867)
* feat: #7855

* fix: tests
2019-08-28 11:22:39 -04:00
Barış Soner Uşaklı
f15c7f12b3 refactor: async/await 2019-08-19 23:17:43 -04:00
Barış Soner Uşaklı
1e0190abef fix: #7842, groups.invite works with an array of uids 2019-08-18 21:51:32 -04:00
Barış Soner Uşaklı
fa26855671 feat: #7842, make isInvited, isPending work with uids 2019-08-18 20:57:14 -04:00
Julian Lam
c44bf48c01 fix: removed console.logs 2019-08-14 15:20:13 -04:00
Julian Lam
f736f0b382 fix: broken tests from 71b205a889 2019-08-14 15:19:00 -04:00
Barış Soner Uşaklı
23046bab9a Merge branch 'master' of https://github.com/NodeBB/NodeBB 2019-07-30 16:44:11 -04:00
Baris Usakli
2abe244b6e fix: newPostEditDuration 2019-07-30 13:03:01 -04:00
Barış Soner Uşaklı
dec8040c09 feat: widgets/index.js
enable widget-essentials in tests
fix widget test
2019-07-29 19:42:55 -04:00
Barış Soner Uşaklı
3c32d8600f fix: #7788 No new posts (#7793)
* feat: debug no-new-posts

* feat: add test for user delete

* fix: timeout for flag test

* feat: shorter
2019-07-23 21:11:04 -04:00
Julian Lam
79eed9ae60 feat: #7743 meta/templates.js 2019-07-23 14:26:14 -04:00
Barış Soner Uşaklı
0b498acdcf fix: #7765 2019-07-22 18:36:29 -04:00
Barış Soner Uşaklı
2f0a331f02 fix: don't return promise 2019-07-19 17:02:25 -04:00
Barış Soner Uşaklı
44a3352003 fix: socket.io methods calling callbacks twice if method returns promise 2019-07-19 16:46:40 -04:00
Julian Lam
4fb271c684 System chat messages (#7771)
* fix: removed duplicate checkContent call in addMessage

addMessage is called in one place (sendMessage), and the checks
are already contained there. addMessage is the lower level call
and so should be called only from within core itself.

* feat: #7330 chat system messages for join, leave, rename

* fix: add back content checking in .addMessage();

* fix: tests, and added .addSystemMessage() method

Tests were relying on message indices that changed due to the
new system messages.

* feat: add tests for system chat messages

* refactor: rewrite half of src/messaging/rooms.js, fix tests

* feat: #7743 messaging/room.js

* fix: tests for messaging/room.js, #7743

* fix: trying to fix tests

* fix: omg :rage2:
2019-07-19 12:20:11 -04:00
Barış Soner Uşaklı
c0c6c652be feat: #7743, finish post module 2019-07-17 19:05:55 -04:00
Barış Soner Uşaklı
1b2b308a7e feat: #7743, posts module 2019-07-17 00:17:21 -04:00
Barış Soner Uşaklı
cd80c2638c feat: #7743
user/password
user/picture
2019-07-16 14:17:10 -04:00
Barış Soner Uşaklı
0a690c5710 feat: #7743
user/online.js
2019-07-16 13:12:21 -04:00
Barış Soner Uşaklı
fe4c048198 feat: #7743
user/index.js
user/info.js
user/invite.js
user/jobs.js
2019-07-16 11:42:24 -04:00
Barış Soner Uşaklı
cd2e68cb2d feat: remove unused code, add 2 tests 2019-07-12 20:16:05 -04:00
Barış Soner Uşaklı
53e1b349ae Change post owner (#7752)
* feat: #7749, allow array of keys for setObject

* feat: sortedSetRemoveBulk

* feat: test for bulk remove

* feat: #7083, ability to change post ownership

* feat: #7083, fix tid:<tid>:posters

* feat: #7083, front end

* fix: #7752, psql methods

* fix: add missing await

* fix: maybe psql
2019-07-12 14:06:09 -04:00
Barış Soner Uşaklı
4170abfd6b feat: add utils.promiseParallel 2019-07-09 22:00:46 -04:00
Barış Soner Uşaklı
805dcd7ca2 Async refactor in place (#7736)
* feat: allow both callback&and await

* feat: ignore async key

* feat: callbackify and promisify in same file

* Revert "feat: callbackify and promisify in same file"

This reverts commit cea206a9b8.

* feat: no need to store .callbackify

* feat: change getTopics to async

* feat: remove .async

* fix: byScore

* feat: rewrite topics/index and social with async/await

* fix: rewrite topics/data.js

fix issue with async.waterfall, only pass result if its not undefined

* feat: add callbackify to redis/psql

* feat: psql use await

* fix: redis 🌋

* feat: less returns

* feat: more await rewrite

* fix: redis tests

* feat: convert sortedSetAdd

rewrite psql transaction to async/await

* feat: 🐶

* feat: test

* feat: log client and query

* feat: log bind

* feat: more logs

* feat: more logs

* feat: check perform

* feat: dont callbackify transaction

* feat: remove logs

* fix: main functions

* feat: more logs

* fix: increment

* fix: rename

* feat: remove cls

* fix: remove console.log

* feat: add deprecation message to .async usage

* feat: update more dbal methods

* fix: redis :voodoo:

* feat:  fix redis zrem, convert setObject

* feat: upgrade getObject methods

* fix: psql getObjectField

* fix: redis tests

* feat: getObjectKeys

* feat: getObjectValues

* feat: isObjectField

* fix: add missing return

* feat: delObjectField

* feat: incrObjectField

* fix: add missing await

* feat: remove exposed helpers

* feat: list methods

* feat: flush/empty

* feat: delete

* fix: redis delete all

* feat: get/set

* feat: incr/rename

* feat: type

* feat: expire

* feat: setAdd

* feat: setRemove

* feat: isSetMember

* feat: getSetMembers

* feat: setCount, setRemoveRandom

* feat: zcard,zcount

* feat: sortedSetRank

* feat: isSortedSetMember

* feat: zincrby

* feat: sortedSetLex

* feat: processSortedSet

* fix: add mising await

* feat: debug psql

* fix: psql test

* fix: test

* fix: another test

* fix: test fix

* fix: psql tests

* feat: remove logs

* feat: user arrow func

use builtin async promises

* feat: topic bookmarks

* feat: topic.delete

* feat: topic.restore

* feat: topics.purge

* feat: merge

* feat: suggested

* feat: topics/user.js

* feat: topics modules

* feat: topics/follow

* fix: deprecation msg

* feat: fork

* feat: topics/posts

* feat: sorted/recent

* feat: topic/teaser

* feat: topics/tools

* feat: topics/unread

* feat: add back node versions

disable deprecation notice
wrap async controllers in try/catch

* feat: use db directly

* feat: promisify in place

* fix: redis/psql

* feat: deprecation message

logs for psql

* feat: more logs

* feat: more logs

* feat: logs again

* feat: more logs

* fix: call release

* feat: restore travis, remove logs

* fix: loops

* feat: remove .async. usage
2019-07-09 12:46:49 -04:00
Julian Lam
8a6a58ee43 feat: added new admin option newbiePostEditDuration (#7737)
* feat: added new admin option newbiePostEditDuration

Also:
  - Grammar-checked a couple language strings
  - Moved a couple form inputs around in new user restrictions
  - Added a test for the new option
  - fix: 'defore' typo
2019-07-04 13:28:36 -04:00
Barış Soner Uşaklı
bd640a1107 Topic await errors (#7727)
* feat: derp await

* feat: restore user.getSettings

* feat: cleanup

* feat: make tid const

* feat: cleanup

* fix: tests

* feat: deprecate filter:controllers.topic.get

* feat: rewrite post-index logic

* feat: change calculation to match others

* fix: use .async

* feat: remove try/catch wrapper
2019-07-03 12:48:26 -04:00
Barış Soner Uşaklı
3ecd703ea3 feat: #7707, added sortedSetAddBulk 2019-06-24 17:48:13 -04:00
Barış Soner Uşaklı
a39f0ef592 fix: #5570, create per category user post zsets 2019-06-24 15:21:43 -04:00
Julian Lam
289dada5f7 fix(deps): update to eslint@6 2019-06-22 21:23:32 -04:00
Aziz Khoury
a6436716ea feat: hooks can now return promise or call callbacks
* hooks can now return promise or call callbacks, either way works

* cleanups

* moar cleanups and fix callback 1st null arg

* rm unnessesary spread
2019-06-10 12:05:27 -04:00
Barış Soner Uşaklı
4b843ba16f fix: #7567, allow invite and approval at the same time 2019-06-04 11:10:20 -04:00
Baris Usakli
31ccc860d3 feat: allow multiple scores in sortedSetsAdd 2019-05-31 15:44:50 -04:00
Barış Soner Uşaklı
8aef689f05 fix: no need for moderate bit for global mods and admins 2019-05-30 20:12:04 -04:00
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
2019-05-30 19:30:47 -04:00
Baris Usakli
64679b37cc fix: #7647, fix getModeratorUids
sets.groupNames is an array that contains other arrays of groupnames so passing it to getMembersOfGroups returned wrong results when there were more than 1 element in it.
2019-05-29 15:44:33 -04:00
Barış Soner Uşaklı
dfab231afd Copy group privs (#7610)
* feat: ability to copy a groups privileges

ability to copy a group's privileges to all categories, or children of current category

* feat: switch to dropdown

added copy from category to groups

* fix: indents
2019-05-15 20:56:23 -04:00
Barış Soner Uşaklı
b990312088 fix: test 2019-04-29 10:59:52 -04:00
Barış Soner Uşaklı
2c98dd5f9d Object cache refactor (#7558)
* fix: cache refactor

db.getObjectField no longer loads entire object
db.getObjectsFields only clones data once
more tests

* feat: add back cache to redis

db.getObjectField no longer loads entire object
2019-04-24 14:38:46 -04:00
Julian Lam
808c4909a4 fix: #6438 only apply whitelist when fields request empty (#7528)
* fix: #6438 only apply whitelist when fields request empty

* feat: explicit password retrieval denied via getUsersFields
2019-04-10 13:55:53 -04:00
Aziz Khoury
3fbb6faf28 feat: update unban logic/invocation and refactor User.bans module
* auto unban when User.getUsersFields is called and the user is banned but has expired

* cleanups and removal of expiry_readable

* expiry_readable make an alias for backward compatibility

* User.bans.func vs User.*ban*Func

* console.log cleanups, plus todo message added

* use code util.deprecate

* fix: remove ununsed winston require
2019-04-05 14:14:48 -04:00
Barış Soner Uşaklı
2ee2cd528f feat: #7501 2019-04-02 11:56:03 -04:00
Barış Soner Uşaklı
b52dba5c92 fix: #7508 2019-04-01 08:27:37 -04:00
Barış Soner Uşaklı
c12e1d19a7 fix: tests 2019-03-19 11:51:40 -04:00