Barış Soner Uşaklı
ec5582b53c
feat: add privilege give/rescind hooks ( #8336 )
...
* feat: add privilege give/rescind hooks
action:privileges.categories.give/rescind
action:privileges.global.give/rescind
breaking change, privileges.categories.give/rescind and privileges.global.give/rescind use full privilege name for groups ie `groups:find` instead of `find`
* fix: tests, privileges renamed
2020-05-26 21:57:38 -04:00
Barış Soner Uşaklı
d080c7b04c
feat: add 2 hooks for modifying privileges
2020-03-12 12:25:51 -04:00
Barış Soner Uşaklı
3455c27a8d
fix : #7901 , handle group names that are translation keys
2019-10-02 22:20:09 -04:00
Julian Lam
29f96b199c
fix(style): requiring parens in block bodies
2019-08-13 15:12:27 -04:00
Julian Lam
0921230976
fix(style): updated code to follow new eslint recommendations
...
Squashed commit of the following:
commit f9ce878b26
Author: Julian Lam <julian@nodebb.org >
Date: Tue Aug 13 14:30:46 2019 -0400
fix(style): updated code to follow new eslint recommendations
commit 80dd370e41
Author: Julian Lam <julian@nodebb.org >
Date: Tue Aug 13 14:14:58 2019 -0400
fix(deps): update dependency sitemap to v4
Squashed commit of the following:
commit f4dd9cabb2
Author: Julian Lam <julian@nodebb.org >
Date: Tue Aug 13 11:33:05 2019 -0400
fix: resolved breaking changes from sitemap v4 upgrade
commit 9043415ee1
Merge: e3352b272 72590b346
Author: Julian Lam <julian@nodebb.org >
Date: Tue Aug 13 11:09:55 2019 -0400
Merge branch 'master' into renovate/sitemap-4.x
commit e3352b272e
Author: Renovate Bot <bot@renovateapp.com >
Date: Mon Aug 12 07:59:05 2019 +0000
fix(deps): update dependency sitemap to v4
commit 8e3c0cdcae
Author: Renovate Bot <bot@renovateapp.com >
Date: Fri Aug 9 00:49:51 2019 +0000
fix(deps): update dependency commander to v3
commit 2104449d38
Author: Renovate Bot <bot@renovateapp.com >
Date: Tue Aug 13 15:00:27 2019 +0000
fix(deps): update dependency mongodb to v3.3.0
commit d2937f446a
Author: Barış Soner Uşaklı <barisusakli@gmail.com >
Date: Tue Aug 13 10:36:48 2019 -0400
feat: async/await admin/controllers
commit 1b97e8b199
Author: Misty (Bot) <deploy@nodebb.org >
Date: Tue Aug 13 09:28:39 2019 +0000
Latest translations and fallbacks
commit 69a48957a2
Author: Barış Soner Uşaklı <barisusakli@gmail.com >
Date: Mon Aug 12 21:56:09 2019 -0400
feat: async/await
commit b9b2a7e593
Author: Barış Soner Uşaklı <barisusakli@gmail.com >
Date: Mon Aug 12 20:58:29 2019 -0400
feat: async/await refactor
controllers/accounts
commit a8d43a1759
Author: Baris Usakli <barisusakli@gmail.com >
Date: Mon Aug 12 14:49:40 2019 -0400
feat: async/await controllers/accounts
commit 2f25aae57b
Author: Barış Soner Uşaklı <barisusakli@gmail.com >
Date: Sun Aug 11 23:09:50 2019 -0400
fix : #7831 , fix pagination
convert to async/await
commit c9e83f2374
Author: Barış Soner Uşaklı <barisusakli@gmail.com >
Date: Sun Aug 11 00:14:35 2019 -0400
fix: remove empty line
commit 30be91b26c
Author: Barış Soner Uşaklı <barisusakli@gmail.com >
Date: Sun Aug 11 00:13:41 2019 -0400
fix: remove useless catchs and empty line
commit 2e4a71c0b6
Author: Renovate Bot <bot@renovateapp.com >
Date: Sat Aug 10 06:51:50 2019 +0000
chore(deps): update dependency eslint-config-airbnb-base to v14
2019-08-13 15:12:27 -04:00
Barış Soner Uşaklı
faccb191ec
feat: #7743 , privileges
2019-07-20 22:12:22 -04:00
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
2019-05-30 19:30:47 -04:00
Barış Soner Uşaklı
26d4e0852f
use includes instead of indexOf
...
use _.uniq instead of filter&indexOf
2018-10-20 14:40:48 -04:00
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
2018-10-15 13:45:55 -04:00
Barış Soner Uşaklı
ac1f7eefe5
closes #2304
2018-01-31 15:20:17 -05:00
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
2018-01-03 13:27:34 -05:00
Baris Usakli
025709499c
more fixes
2017-12-20 15:19:22 -05:00
Baris Usakli
242dc41aca
move privileges to same page
2017-12-20 14:49:20 -05:00
Barış Soner Uşaklı
8db193ff55
privileges style changes
2017-05-25 21:17:20 -04:00
Julian Lam
72e77772db
Merge branch 'master' into develop
2017-02-24 12:46:40 -05:00
Peter Jaszkowiak
feb8405f95
ESlint eol-last
2017-02-18 02:30:48 -07:00
Peter Jaszkowiak
604358ecc4
ESlint keyword-spacing, no-multi-spaces
2017-02-18 01:52:56 -07:00
Peter Jaszkowiak
3361a72725
ESlint no-plusplus
...
and no-empty, space-unary-ops
2017-02-18 01:12:18 -07:00
Peter Jaszkowiak
2ba46808a1
ESlint one-var, fix comma-dangle
2017-02-17 20:20:42 -07:00
Peter Jaszkowiak
bc1d70c126
ESlint comma-dangle
2017-02-17 19:31:21 -07:00
Peter Jaszkowiak
ec544518e8
Use async v2
2017-01-02 22:23:17 -07:00
HeeL
4a3c31b2dc
Fix space-before-function-paren linter rule
2016-10-13 11:43:39 +02:00
HeeL
3fa1c1f927
Fix space-infix-ops linter rule
2016-10-13 11:42:29 +02:00
barisusakli
07852862f5
improve helpers.isUserAllowedTo
...
ability to pass in an array of privileges and a single cid
2016-09-15 14:01:56 +03:00
barisusakli
b933385b76
partially revert fa9f1ac7fe
...
extending module.exports instead of overwriting fixes the issue
2016-08-27 12:58:08 +03:00
barisusakli
fa9f1ac7fe
fix dependency errors
2016-08-27 01:52:08 +03:00
barisusakli
08f52b1e0b
remove unused requires
2016-01-23 12:12:46 +02:00
barisusakli
b2087f94e2
closes #2904
2015-03-30 13:31:08 -04:00
barisusakli
604dac88e3
closes #2382 , closes #2130
2014-11-11 17:25:16 -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
37d7756271
hasEnoughRep can take an array
...
user follow uid checks
2014-11-04 18:44:08 -05: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
e420ee5fb6
privilege fix for single category check
2014-08-02 19:45:13 -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
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
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