Commit Graph

64 Commits (a0f0dd021b6b275d377aec83956a8fc0a0e7aa52)

Author SHA1 Message Date
Barış Soner Uşaklı 66e7cdac7a fix: , ignore if assigning to same parent
gasoved 077330b764
feat: scheduled topics ()
* feat: scheduled topics

* refactor: linting fixes

* fix: tests

* fix(test): race condition

* fix: make a single request
Barış Soner Uşaklı e789fe8d2a fix: , don't show deleted topic titles in inf scroll
Peter Jaszkowiak cc9d6fd08b chore: eslint max-len
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ı 647d3ba810 fix: removed methods
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>
Barış Soner Uşaklı 97c086aba9 fix: missing await
Barış Soner Uşaklı aad0880f7c feat: add filter:categories.getRecentTopicReplies
pass req.query to getRecentTopicReplies
Opliko b9583ed838 Add privilege for accessing user information ()
* 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
Barış Soner Uşaklı bd640a1107
Topic await errors ()
* 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
Barış Soner Uşaklı 8aef689f05 fix: no need for moderate bit for global mods and admins
Barış Soner Uşaklı 035f624758
Remove implicit mod privs. closes ()
* 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
Baris Usakli 64679b37cc fix: , 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.
Barış Soner Uşaklı dfab231afd
Copy group privs ()
* 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
Barış Soner Uşaklı 2ee2cd528f feat:
Barış Soner Uşaklı c72da5595a fix:
3 new global privileges
view:users
view:tags
view:groups
Barış Soner Uşaklı 9d1fcf4e36 fix: closes
Baris Usakli 7809ba2800 fix: , closes
Barış Soner Uşaklı eb7ae54f81
Category watch state ()
* 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
Baris Usakli d3c6cba33f closes
Barış Soner Uşaklı a63ddbe2aa fix:
if category doesn't exist return null and 404
Baris Usakli cd46febdd0 fix lint
Baris Usakli b86f155690 fix:
Baris Usakli 3c611d85ed closes
- on category setParent dialog do not show children of current category
- break recursion if category parentCid is equal to child cid to prevent
infinite loop
- dont allow setting the parentCid of a category to one of it's children
Barış Soner Uşaklı c738dc7d3e remove some more parseInts
Barış Soner Uşaklı ee2f9e9434 remove some parseInts
Baris Usakli baf91089a6 remove unused methods
Barış Soner Uşaklı 805da98a36 remove unnecessary groups.resetCache calls
Barış Soner Uşaklı 77beaf2e15
Allow local login,closes ()
* WIP

* reset groups cache after every suite
Julian Lam 8d41e319ea fixed tests
Julian Lam 510dd268cc fix tests
Barış Soner Uşaklı a7267df404 closes
Barış Soner Uşaklı 8e8058ec6e closes
Barış Soner Uşaklı e1c6761087 closes
Baris Usakli ecf6c0f3ec closes
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
Barış Soner Uşaklı 7fe9366103 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Barış Soner Uşaklı d65f494c6d closes
Baris Usakli 0ea4ee7dda Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Baris Usakli 4903585d88 refactor userPrivileges and groupPrivileges
Baris Usakli 037a0e5239 closes
also fix reverse infinite scroll when sorting is changed
Peter Jaszkowiak b171f3072b Fix many "duplicate key" errors
- Reset defaults after every test
- Remove individual `after(db.emptydb)` calls
- Fix async.every in groups test
- Update plugin list in socket tests
barisusakli 324e5be7bd privileges tests
Peter Jaszkowiak 896c8c7343 ESlint object-curly-spacing
Peter Jaszkowiak 3b0dd2d1ef ESlint padded-blocks
Peter Jaszkowiak 2e031f3759 ESlint comma-spacing
Peter Jaszkowiak 52f2028206 ESlint no-multiple-empty-lines