Commit Graph

47 Commits (22e20b961e9186c6e6b68dfa3379f42f3192b811)

Author SHA1 Message Date
barisusakli 8e114c2093 moved isAdminOrMod check out of getTopicsByTids
barisusakli 52c12fa1b1 use wrapper functions getPostsFields and getTopicsFields
barisusakli 5c7487c13b err check
Julian Lam b65d518a97 properly handling error for hook filter:privileges.posts.filter
Julian Lam 20ea40133b added four new hooks: filter:categories.recent, filter:privileges.categories.get, filter:privileges.posts.filter, filter:privileges.topics.filter
Julian Lam c0fc7e9ca4 updating privilege handling to fire two new hooks, filter:privileges.topics.get and filter:category.topics.get
barisusakli 15e472db12 on category creation give defaults privs to admins and registered users
barisusakli fa5ac04cd3 src/topics.js cleanup
barisusakli 604dac88e3 closes , closes
barisusakli c18de5cdd2 posts/recent.js refactor
barisusakli 420aa5e102 fix moderators
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 06f66337fb anon checks
less db calls for uid 0
barisusakli 37d7756271 hasEnoughRep can take an array
user follow uid checks
barisusakli 9a21e9646f only use multipart on upload routes,
delete temp files if there is an error in admin,
admin/mods should see topic reply
barisusakli fd00dddd62 admin/mods always gets the reply privs
barisusakli ec9bf48477 admins/mods can always read topics
barisusakli 7de9b998b5 fix typo in ajaxify, closes
barisusakli eab180f305 crash fix
barisusakli 7d93926ef7 removed async.map
barisusakli 4e6719e0aa added filterUids method to privileges
used to filter uids on a single category
barisusakli 57e204df8e removed most of the debug
dont get more than 6 usernames for upvote tooltips
generatePostPaths wont check null pids
barisusakli 0cfa430444 crash fix
barisusakli 7405051924 50
barisusakli 5fd199ae8a check privs pids
barisusakli 528ee335d5 optimize getTopicsByTids and getTeasers
barisusakli e420ee5fb6 privilege fix for single category check
barisusakli 1398937dd8 early outs for privs
no need to check if empty array is passed in, happens if there are no
unread topics
remove dupe cids before checking for privileges
barisusakli cfc67d4e90 closes
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 d57f183f42 privileges.posts.get takes an array of pids now
barisusakli c191aa079f closes
barisusakli bd4722665d closes
removed move button from main post, disable moving main post, fixed
moving posts.
barisusakli 9af12819e3 closes
barisusakli b8b482e287 closes
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 29420d6f82 fixed indents
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