364 Commits (1d1639d46f15c5a9c84d3ccfc7a334244c28039a)

Author SHA1 Message Date
Barış Soner Uşaklı 0dca13e9c2 feat: optimize copy privileges 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
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.
6 years ago
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
6 years ago
Barış Soner Uşaklı 397e062a3c fix: clear children before building tree
prevents infinite loop on databases that have children array saved in database
6 years ago
Barış Soner Uşaklı 3304ffe978 fix: #7502 6 years ago
Barış Soner Uşaklı 81306fff3c feat: allow multiple cids for getActiveUsers 6 years ago
Julian Lam 745a9589e9
Use topics:read privilege for topic filtering use cases (#7462)
* fix: use topics:read privilege for topic filtering use cases

* fix: tests

* fix: more broken tests
6 years ago
Barış Soner Uşaklı b71e0eb179 fix: prevent infinite loops if category is already in children 6 years ago
Barış Soner Uşaklı 4732bed3db fix: #7448
don't set parent to itself
6 years ago
Baris Usakli 7809ba2800 fix: #7193, closes #7194 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ı 78fa734017 feat: cache category tag whitelist 6 years ago
Baris Usakli d3c6cba33f closes #7060 6 years ago
Barış Soner Uşaklı a63ddbe2aa fix: #7040
if category doesn't exist return null and 404
6 years ago
SweetPPro dab1a1d638 fix for null category (#7029) 6 years ago
Barış Soner Uşaklı 29e9310aa5 dont crash for undefined categories 6 years ago
Barış Soner Uşaklı 00a066985a cache categories:cid and cid:<cid>:children
these rarely change, no need to go to db for them
6 years ago
Barış Soner Uşaklı 59eeff8f0f closes #7011 6 years ago
Barış Soner Uşaklı 53ad2bbd6e
Categories optimize (#6999)
* WIP

* fix category page

* fix counts, and copyPrivileges

* fix lint

* more fixes,

* redis fix

* fix test

* fix  category test

* remove getParentsAndChildren
6 years ago
Barış Soner Uşaklı d5af39ca5d make 1 call for parentCids 6 years ago
Barış Soner Uşaklı eba1a405d2 load category parents and childrens in one call
add more missing guest/spider checks
6 years ago
Barış Soner Uşaklı 20abc7fc47 closes #6985 6 years ago
Barış Soner Uşaklı 157a7d1f0e prevent possible crash if category.posts is undefined 6 years ago
Baris Usakli 3425370adb dont use indexOf in map 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
Baris Usakli 968be7d8de make lint happy 6 years ago
Baris Usakli 3c611d85ed closes #6912
- 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
6 years ago
Barış Soner Uşaklı 5ee4529a8e if source has no parentCid assume 0 6 years ago
Barış Soner Uşaklı 9918389a43 closes #6884 6 years ago
Barış Soner Uşaklı c27be9db5a
Recent refactor (#6879)
* wip

* fix inf scroll

* remove duplicated code

* remove dupe code in /unread

* use topicList

* update tag page to use topicList

* fix tests

* combine ifs

* remove more dupe code

* disable timeout
6 years ago
Baris Usakli 12f3f56b01 change to .exists 6 years ago
Barış Soner Uşaklı fb6067a7ca only parse if field is requested 6 years ago
Barış Soner Uşaklı f3a679e268 remove parseInts 6 years ago
Barış Soner Uşaklı 44a957faca remove more parseints 6 years ago
Baris Usakli 138154a71c move modules 6 years ago
Barış Soner Uşaklı c738dc7d3e remove some more parseInts 6 years ago
Barış Soner Uşaklı 9c022afae1
Parse int (#6853)
* Store config fields as JSON in the db

Fewer parseInts

* Remove unnecessary parseInts

* remove some dupe code add tests

* remove console.log

* remove more parseInts

* WIP: read meta.configs defaults from defaults.json

remove more parseInts

* more work

* add log for failing test

* update admin pwd

* fix tests, dont require posts/cache before configs are initialized

* handle saves

* Test boolean conditions

* remove more parseInts

* Fix boolean values

* remove lots more parseInts

* removed json parsing

* renamed var to number

* categories dont have timestamp
6 years ago
Barış Soner Uşaklı ee2f9e9434 remove some parseInts 6 years ago
Barış Soner Uşaklı f5fe91286e closes #6851 6 years ago
Barış Soner Uşaklı f53984aeae refactor user/category data 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ı b57db7fd8e
update groups join to take array of group names (#6834)
* allow groups.join to take an array of group names

* pass an array to groups.join/leave in privileges

* split up groups/membership

* add hits/miss to group cache

* fix typo
6 years ago
Barış Soner Uşaklı 5c7dd54815
fix zsets and update them on post move, closes #6823 (#6827) 6 years ago
Baris Usakli edefab1d69 closes #6728
add option to disable a category on creation
show disabled categories on manage privileges
6 years ago
Andrew Rodrigues a06b33a713 fix html characters when cloning children categories 7 years ago
Andrew Rodrigues 12940b577b closes #6703 7 years ago
Barış Soner Uşaklı e8d7a23e2e remove deprecated methods 7 years ago
Barış Soner Uşaklı 2fd2accf8c add tests for top topics
fix popular page displaying 18 topics per page
7 years ago
Julian Lam 99dc3feeb2 Edit history is now a category-level privilege
Closes #6425
7 years ago
Julian Lam fdc30537cb Merge remote-tracking branch 'origin/master' into user-blocking 7 years ago
Barış Soner Uşaklı 7c43c7e0f9 closes #6473 7 years ago
Julian Lam bfee23adee basic methods and initial integration for #6463 7 years ago
Barış Soner Uşaklı fde44cb9b9 pass array to groups.destroy
pass array to db.sortedSetRemove
7 years ago
Davis 9d171ca1e2 Add cid for filter:category.update hook (#6319) 7 years ago
Baris Usakli ecf6c0f3ec closes #4652 7 years ago
Barış Soner Uşaklı 8446a733e5 closes #5569 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
Barış Soner Uşaklı 2bf275fe29 #6158 7 years ago
Baris Usakli 5604c62776 use the first set for sorting 7 years ago
Baris Usakli 6778cce265 add new zset 7 years ago
Baris Usakli a500e0019c closes #6005 7 years ago
Baris Usakli bc6b1a8f56 Merge remote-tracking branch 'refs/remotes/origin/master' into develop
# Conflicts:
#	public/src/admin/extend/plugins.js
8 years ago
Barış Soner Uşaklı c0f390322c https://github.com/Schamper/nodebb-plugin-poll/issues/86 8 years ago
Julian Lam 184dacf1d7 Merge branch 'master' into develop 8 years ago
Barış Soner Uşaklı 67ca1881bd closes #5831 8 years ago
Baris Usakli 72cafd55cf 2 new hooks for changing direction and set name 8 years ago
Barış Soner Uşaklı e0dc47f883 closes #5779 8 years ago
Barış Soner Uşaklı 7fe9366103 Merge remote-tracking branch 'refs/remotes/origin/master' into develop 8 years ago
Barış Soner Uşaklı d65f494c6d closes #5127 8 years ago
Baris Usakli 037a0e5239 closes #5742
also fix reverse infinite scroll when sorting is changed
8 years ago
Baris Usakli 1d26fc0d89 closes #5741 8 years ago
psychobunny 88d5f97280 closes #5717 8 years ago
Peter Jaszkowiak 3c2d4fe649 Switch from underscore to lodash 8 years ago
Barış Soner Uşaklı f1b8492164 remove unnecessary checks 8 years ago
Barış Soner Uşaklı 02dee48329 use backgroundImage if its passed in 8 years ago
Barış Soner Uşaklı 79a48cec5f controllers/category tests 8 years ago
Barış Soner Uşaklı f57b5f4e4c refactor 8 years ago
Barış Soner Uşaklı 3a1eba2537 merge 8 years ago
Barış Soner Uşaklı 0b3656f34c fix timeouts on category.purge when there are 20k groups 8 years ago
barisusakli e3205bcfad merge 8 years ago
Peter Jaszkowiak 0fe10f5e86 Escape topic titles at the source, deduplicate 8 years ago
Julian Lam a141835cf8 Merge branch 'master' into develop 8 years ago
Peter Jaszkowiak 1fb48ef7a7 Fix #5592 (#5593)
* Fix #5592
Escape translation tokens in topic titles, descriptions, profile about, and post contents

* Fix tests
8 years ago
Julian Lam d18cfced96 Merge remote-tracking branch 'origin/master' into develop 8 years ago
Peter Jaszkowiak 484a800327 Merge branch master into develop 8 years ago
Peter Jaszkowiak 1ed571189c Make utils and translator easier to require
Move utils.walk to file.walk, backwards compatible
8 years ago
Peter Jaszkowiak 8119b8c4ae `filter:teasers.get` provided with `uid` 8 years ago
Julian Lam ddea9f534e running eslint again 8 years ago
Julian Lam 72e77772db Merge branch 'master' into develop 8 years ago
Peter Jaszkowiak 93f38d4f30 ESlint no-multi-assign
and max-nested-callbacks, no-mixed-requires, max-statements-per-line
8 years ago
Peter Jaszkowiak 4bb49a7171 ESlint no-unused-vars 8 years ago
Peter Jaszkowiak c18808fdeb ESlint no-useless-concat, no-mixed-spaces-and-tabs 8 years ago
Peter Jaszkowiak 57f89663aa ESlint radix 8 years ago
Peter Jaszkowiak 896c8c7343 ESlint object-curly-spacing 8 years ago
Peter Jaszkowiak 3b0dd2d1ef ESlint padded-blocks 8 years ago
Peter Jaszkowiak feb8405f95 ESlint eol-last 8 years ago
Peter Jaszkowiak a038c66549 ESlint quotes 8 years ago
Peter Jaszkowiak 532951c24f ESlint space-in-parens, block-spacing 8 years ago
Peter Jaszkowiak 3361a72725 ESlint no-plusplus
and no-empty, space-unary-ops
8 years ago
Peter Jaszkowiak 52f2028206 ESlint no-multiple-empty-lines 8 years ago
Peter Jaszkowiak bc1d70c126 ESlint comma-dangle 8 years ago
barisusakli 3fb7f9fce5 closes #5398 8 years ago
Julian Lam 9dcbe875a0 Merge branch 'master' into develop 8 years ago
Julian Lam c99321a518 always setting app.previousUrl now, and passing cid into filter:category.topics.get hook 8 years ago
barisusakli 8f0f959d53 add `filter:categories.copyPrivilegesFrom`
https://github.com/Schamper/nodebb-plugin-poll/issues/77
8 years ago
barisusakli c0a8fd7395 allow multiple tags 8 years ago
Barış Soner Uşaklı 805cacb2af dont add tid to :tids:posts if its pinned 8 years ago
barisusakli 0b9829850c closes #5273 8 years ago
barisusakli 49267d54b7 topics unread tests 8 years ago
barisusakli c33d3e874a store pinned topics in new zset
keep pinned topics on top on different sort types
8 years ago
barisusakli 1658ebbe20 categories update test 8 years ago
Sergii Paryzhskyi e515b791da Fix eslint rules (#5117)
* Fix semi linter rule

* Fix semi-spacing linter rule

* Fix no-undef-init linter rule

* Fix space-before-blocks linter rule
8 years ago
HeeL 4a3c31b2dc Fix space-before-function-paren linter rule 8 years ago
HeeL 3fa1c1f927 Fix space-infix-ops linter rule 8 years ago
barisusakli 038418bf87 batch.processArray
use batch.processArray in notifications.push and moveRecentReplies
added notification tests
added test for moveRecentReplies
clear group cache if a group is deleted
8 years ago
barisusakli a6c3be0bb1 store category recent tids for faster retrieval 9 years ago
barisusakli 958fe3e72f closes #3762 9 years ago
barisusakli 07fe5057e1 make sure validator.escape() receives strings only 9 years ago
barisusakli fa9f1ac7fe fix dependency errors 9 years ago
barisusakli 89f550ce7c moved middleware requires 9 years ago
barisusakli 56c4e13316 another dependency fix and test 9 years ago
barisusakli 6d946425fa fix tests, circular deps 9 years ago
Barış Soner Uşaklı e1c0a8f3b3 Merge pull request #4909 from BenLubar/self-topic-deletion
add edit/delete post, delete topic privileges per-category
9 years ago
Ben Lubar 936149bb38 grant topics:delete by default <f62da5c4e9 (r74206749)> 9 years ago
Ben Lubar f62da5c4e9 see NodeBB/NodeBB#4909 9 years ago
barisusakli bb05e6e393 closes #4916 9 years ago
Ben Lubar 26df552d55 Add edit, delete, and topics:delete permissions for users acting on their own posts 9 years ago
barisusakli d2cbd7e6dc new priv for uploads 9 years ago
barisusakli 73e21d1d31 closes #4720 9 years ago
barisusakli c969870cb6 removed dupe privilegeList, added missing privilege to copyPrivsFrom 9 years ago
barisusakli b2311edb94 bubble replies from subcategories to the parents 9 years ago
psychobunny 5baf077cbe Merge branch 'master' of https://github.com/NodeBB/NodeBB 9 years ago
psychobunny e9921edb87 Merge remote-tracking branch 'refs/remotes/origin/topics-read-privileges' 9 years ago
Barış Soner Uşaklı dd1b261950 closes #4712 9 years ago
Barış Soner Uşaklı 26be7c25e4 closes #4701 9 years ago
psychobunny b37b083a4d new privilege: Access Topic
differentiation between Access Category and Access Topic, ie. allows you
to see the category view but not actually enter the topic itself
9 years ago
barisusakli 38d1bde895 closes #4669 9 years ago
barisusakli bf2133ed7c topic watching 9 years ago
barisusakli 5e5e46e95f closes #4499 9 years ago
Julian Lam 5f36bfab01 re: #4578 9 years ago
Julian Lam de9357970f fixes #4578 9 years ago
Julian Lam 8eaff1492a Added ACP option to customise recent post
Before, could either be OP or last reply.

Now, you can choose between OP, last reply, or last post (which
includes OP)
9 years ago
barisusakli eb28e178a7 closes #4567 9 years ago
barisusakli b948e031f6 closes #2779 9 years ago
barisusakli c9cfe5b089 closes #4355 9 years ago
Julian Lam a275aaeaf5 fixes #4361 9 years ago
barisusakli b0151502c2 use '-inf'/'+inf' 9 years ago