Commit Graph

17 Commits (70b5c631c6feb2dc312f0eb068e2e98ce1734409)

Author SHA1 Message Date
barisusakli 4440260f8f closes
barisusakli 70657251b9 no need for return
Julian Lam 44175188c4 handling case where user does not satisfy any of the privilege thresholds given to the hasEnoughReputationFor method
barisusakli 37d7756271 hasEnoughRep can take an array
user follow uid checks
barisusakli 7d93926ef7 removed async.map
barisusakli 4e6719e0aa added filterUids method to privileges
used to filter uids on a single category
barisusakli e420ee5fb6 privilege fix for single category check
barisusakli 7e82d3d9a5 fix guest priv
barisusakli efdd795084 closes
barisusakli fed8cc6d53 optimize privileges and assorted fixes.
* new methods
privileges.categories.filter
privileges.topics.filter
privileges.posts.filter

they take a list of ids and a privilege, and return the filtered list of
ids, faster than doing  async.filter and calling the db for each id.

* remove event listeners on recent page before adding
* group.exists works for both single group names and arrays
* helpers.allowedTo works for both a single cid and an array of cids
* moved filter:topic.post hook right before topic creation.
* moved filter:topic.reply hook right before topic reply.
barisusakli 472e6b5206 privilege cleanup
Julian Lam b1534b7798 removing allowGuestPosting logic in NodeBB
Julian Lam 3474cdc5ea added new privilege "find", added guest meta group, closed
barisusakli b1aae05a08 closes
barisusakli 3e86bdb38f more work on
still needs more work, category is next
barisusakli 292e4bbdd6 fixed post privilege privilege
barisusakli 4234057821 first pass for
this only handles postTools privileges, topic and category will follow