262 Commits (035f624758dc4d88b32e5aecebc881d1d0fbb073)

Author SHA1 Message Date
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 7 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
7 years ago
Barış Soner Uşaklı 263c918088
feat: remove uid:<uid>:ignored:cids (#7099)
use cid:<cid>:ignorers instead
7 years ago
Barış Soner Uşaklı 78fa734017 feat: cache category tag whitelist 7 years ago
Baris Usakli d3c6cba33f closes #7060 7 years ago
Barış Soner Uşaklı a63ddbe2aa fix: #7040
if category doesn't exist return null and 404
7 years ago
SweetPPro dab1a1d638 fix for null category (#7029) 7 years ago
Barış Soner Uşaklı 29e9310aa5 dont crash for undefined categories 7 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
7 years ago
Barış Soner Uşaklı 59eeff8f0f closes #7011 7 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
7 years ago
Barış Soner Uşaklı d5af39ca5d make 1 call for parentCids 7 years ago
Barış Soner Uşaklı eba1a405d2 load category parents and childrens in one call
add more missing guest/spider checks
7 years ago
Barış Soner Uşaklı 20abc7fc47 closes #6985 7 years ago
Barış Soner Uşaklı 157a7d1f0e prevent possible crash if category.posts is undefined 7 years ago
Baris Usakli 3425370adb dont use indexOf in map 7 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 😬
7 years ago
Baris Usakli 968be7d8de make lint happy 7 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
7 years ago
Barış Soner Uşaklı 5ee4529a8e if source has no parentCid assume 0 7 years ago
Barış Soner Uşaklı 9918389a43 closes #6884 7 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
7 years ago
Baris Usakli 12f3f56b01 change to .exists 7 years ago
Barış Soner Uşaklı fb6067a7ca only parse if field is requested 7 years ago
Barış Soner Uşaklı f3a679e268 remove parseInts 7 years ago
Barış Soner Uşaklı 44a957faca remove more parseints 7 years ago
Baris Usakli 138154a71c move modules 7 years ago
Barış Soner Uşaklı c738dc7d3e remove some more parseInts 7 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
7 years ago
Barış Soner Uşaklı ee2f9e9434 remove some parseInts 7 years ago
Barış Soner Uşaklı f5fe91286e closes #6851 7 years ago
Barış Soner Uşaklı f53984aeae refactor user/category data 7 years ago
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
7 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
7 years ago
Barış Soner Uşaklı 5c7dd54815
fix zsets and update them on post move, closes #6823 (#6827) 7 years ago
Baris Usakli edefab1d69 closes #6728
add option to disable a category on creation
show disabled categories on manage privileges
7 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