Commit Graph

49 Commits

Author SHA1 Message Date
Julian Lam
8ba05c08fe category privilege rescinding 2015-01-16 17:03:19 -05:00
barisusakli
b07a522c60 one less query in privileges.topics.get 2014-12-20 18:34:02 -05:00
barisusakli
8e114c2093 moved isAdminOrMod check out of getTopicsByTids 2014-11-16 16:15:49 -05:00
barisusakli
52c12fa1b1 use wrapper functions getPostsFields and getTopicsFields 2014-11-14 20:19:14 -05:00
barisusakli
5c7487c13b err check 2014-11-14 19:38:51 -05:00
Julian Lam
b65d518a97 properly handling error for hook filter:privileges.posts.filter 2014-11-14 17:53:20 -05:00
Julian Lam
20ea40133b added four new hooks: filter:categories.recent, filter:privileges.categories.get, filter:privileges.posts.filter, filter:privileges.topics.filter 2014-11-14 17:31:44 -05:00
Julian Lam
c0fc7e9ca4 updating privilege handling to fire two new hooks, filter:privileges.topics.get and filter:category.topics.get 2014-11-12 14:33:25 -05:00
barisusakli
15e472db12 on category creation give defaults privs to admins and registered users 2014-11-11 22:58:34 -05:00
barisusakli
fa5ac04cd3 src/topics.js cleanup 2014-11-11 19:47:56 -05:00
barisusakli
604dac88e3 closes #2382, closes #2130 2014-11-11 17:25:16 -05:00
barisusakli
c18de5cdd2 posts/recent.js refactor 2014-11-09 01:30:27 -05:00
barisusakli
420aa5e102 fix moderators 2014-11-09 00:33:26 -05:00
barisusakli
4440260f8f closes #2275 2014-11-06 17:06:58 -05:00
barisusakli
70657251b9 no need for return 2014-11-04 23:30:11 -05:00
Julian Lam
44175188c4 handling case where user does not satisfy any of the privilege thresholds given to the hasEnoughReputationFor method 2014-11-04 23:19:28 -05:00
barisusakli
06f66337fb anon checks
less db calls for uid 0
2014-11-04 19:06:01 -05:00
barisusakli
37d7756271 hasEnoughRep can take an array
user follow uid checks
2014-11-04 18:44:08 -05:00
barisusakli
9a21e9646f only use multipart on upload routes,
delete temp files if there is an error in admin,
admin/mods should see topic reply
2014-10-22 18:26:01 -04:00
barisusakli
fd00dddd62 admin/mods always gets the reply privs 2014-10-22 16:12:29 -04:00
barisusakli
ec9bf48477 admins/mods can always read topics 2014-10-21 18:09:32 -04:00
barisusakli
7de9b998b5 fix typo in ajaxify, closes #2279 2014-10-19 17:11:05 -04:00
barisusakli
eab180f305 crash fix 2014-10-02 19:03:03 -04:00
barisusakli
7d93926ef7 removed async.map 2014-09-20 23:04:49 -04:00
barisusakli
4e6719e0aa added filterUids method to privileges
used to filter uids on a single category
2014-09-14 12:07:24 -04:00
barisusakli
57e204df8e removed most of the debug
dont get more than 6 usernames for upvote tooltips
generatePostPaths wont check null pids
2014-09-06 20:46:18 -04:00
barisusakli
0cfa430444 crash fix 2014-09-06 02:46:43 -04:00
barisusakli
7405051924 50 2014-09-06 02:41:04 -04:00
barisusakli
5fd199ae8a check privs pids 2014-09-06 02:39:54 -04:00
barisusakli
528ee335d5 optimize getTopicsByTids and getTeasers 2014-08-06 21:30:11 -04:00
barisusakli
e420ee5fb6 privilege fix for single category check 2014-08-02 19:45:13 -04:00
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
2014-07-31 17:29:20 -04:00
barisusakli
cfc67d4e90 closes #1924 2014-07-30 15:14:04 -04:00
barisusakli
7e82d3d9a5 fix guest priv 2014-07-30 14:47:04 -04:00
barisusakli
efdd795084 closes #1922 2014-07-30 14:29:48 -04:00
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.
2014-07-29 21:51:46 -04:00
barisusakli
d57f183f42 privileges.posts.get takes an array of pids now 2014-06-28 14:59:01 -04:00
barisusakli
c191aa079f closes #1735 2014-06-24 13:27:37 -04:00
barisusakli
bd4722665d closes #1725
removed move button from main post, disable moving main post, fixed
moving posts.
2014-06-23 18:06:59 -04:00
barisusakli
9af12819e3 closes #1731 2014-06-23 17:26:02 -04:00
barisusakli
b8b482e287 closes #1555 2014-05-22 14:56:15 -04:00
barisusakli
472e6b5206 privilege cleanup 2014-05-17 18:59:34 -04:00
Julian Lam
b1534b7798 removing allowGuestPosting logic in NodeBB 2014-05-16 16:29:43 -04:00
Julian Lam
3474cdc5ea added new privilege "find", added guest meta group, closed #1282 2014-05-16 15:47:04 -04:00
barisusakli
b1aae05a08 closes #1518 2014-05-15 20:49:47 -04:00
barisusakli
29420d6f82 fixed indents 2014-05-15 10:49:53 -04:00
barisusakli
3e86bdb38f more work on #1518
still needs more work, category is next
2014-05-15 10:38:02 -04:00
barisusakli
292e4bbdd6 fixed post privilege privilege 2014-05-15 07:48:21 -04:00
barisusakli
4234057821 first pass for #1518
this only handles postTools privileges, topic and category will follow
2014-05-14 17:53:27 -04:00