Commit Graph

67 Commits

Author SHA1 Message Date
Julian Lam
1e7cf1cbc4 fix: #8971, disallow flags of privileged users (mods, gmods, admins) 2020-11-27 11:54:32 -05:00
Julian Lam
6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 2020-11-20 16:32:39 -05:00
Julian Lam
8518404e22 feat: allow groups to specify which cids to show member posts from (#8875)
* feat: allow groups to specify which cids to show member posts from

* docs: fix tests for openapi

* fix: test breakage caused by improper conditional

* feat: server-side checking of memberPostCids for validity

* feat: admin panel template update to select categories to include

* refactor: privilege helpers.isUserAllowedTo

... to helpers.isAllowedTo, allowing group names to be passed in
2020-11-13 14:15:37 -05:00
Barış Soner Uşaklı
9969dd6335 fix: use view_deleted when filtering, closes #8137 2020-01-28 12:42:57 -05:00
Barış Soner Uşaklı
faccb191ec feat: #7743, privileges 2019-07-20 22:12:22 -04:00
Julian Lam
8a6a58ee43 feat: added new admin option newbiePostEditDuration (#7737)
* feat: added new admin option newbiePostEditDuration

Also:
  - Grammar-checked a couple language strings
  - Moved a couple form inputs around in new user restrictions
  - Added a test for the new option
  - fix: 'defore' typo
2019-07-04 13:28:36 -04:00
Baris Usakli
667bc67f04 fix: dont allow edit if post is deleted by someone else 2019-06-26 12:06:57 -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
Julian Lam
f659ef4d80 feat: new hook filter:privileges.posts.edit 2019-01-26 13:48:57 -05:00
Peter Jaszkowiak
ba619c7ec8 style(eslint): match operator-linebreak preferences 2018-11-30 13:38:59 -05:00
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 😬
2018-11-07 15:53:14 -05:00
Barış Soner Uşaklı
ac39112271 remove more parseInts 2018-10-21 19:33:46 -04:00
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
2018-10-21 16:47:51 -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
Julian Lam
9e90d1ea5d closes #6557 2018-06-11 16:45:25 -04:00
Julian Lam
cb3b2bd27b closes #6562 2018-06-08 16:01:33 -04:00
Barış Soner Uşaklı
72140e5338 closes #5991, closes #5884 2018-01-12 17:29:47 -05:00
Baris Usakli
a19537dc25 closes #6137 2017-11-29 14:04:45 -05:00
Barış Soner Uşaklı
5344edc2a7 closes #5885 2017-08-18 20:08:19 -04:00
Barış Soner Uşaklı
38af651072 use _.uniq 2017-06-25 20:00:05 -04:00
Barış Soner Uşaklı
8db193ff55 privileges style changes 2017-05-25 21:17:20 -04:00
Peter Jaszkowiak
4bb49a7171 ESlint no-unused-vars 2017-02-18 15:05:36 -07:00
Peter Jaszkowiak
896c8c7343 ESlint object-curly-spacing 2017-02-18 12:30:49 -07:00
Peter Jaszkowiak
3b0dd2d1ef ESlint padded-blocks 2017-02-18 02:32:24 -07:00
Peter Jaszkowiak
feb8405f95 ESlint eol-last 2017-02-18 02:30:48 -07:00
Peter Jaszkowiak
3361a72725 ESlint no-plusplus
and no-empty, space-unary-ops
2017-02-18 01:12:18 -07:00
Peter Jaszkowiak
bc1d70c126 ESlint comma-dangle 2017-02-17 19:31:21 -07:00
barisusakli
96d05b58d4 show deleted replies like regular deleted posts 2016-11-02 13:21:57 +03:00
barisusakli
218a1b7aab closes #5015 2016-10-31 22:39:58 +03: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
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
56d325bd86 privilege fixes 2016-08-10 23:55:49 +03:00
Ben Lubar
f62da5c4e9 see NodeBB/NodeBB#4909 2016-08-09 09:50:49 -05:00
Ben Lubar
26df552d55 Add edit, delete, and topics:delete permissions for users acting on their own posts 2016-08-06 21:23:09 -05:00
barisusakli
795b00a3af closes #4810 2016-07-01 13:01:09 +03:00
barisusakli
14b067a838 closes #4800 2016-06-28 12:34:16 +03:00
barisusakli
5ff5a01c4f check for invalid topic 2016-04-29 22:33:08 +03:00
barisusakli
5e5e46e95f closes #4499 2016-04-29 20:35:57 +03:00
barisusakli
fa136ca021 remove unused code 2016-01-20 18:01:02 +02:00
barisusakli
11c70f3a28 closes #2330 2015-09-16 08:35:40 -04:00
barisusakli
3ffd3a5d3c closes #2970, closes #3078 2015-04-21 16:26:29 -04:00
barisusakli
b2087f94e2 closes #2904 2015-03-30 13:31:08 -04:00
Barış Soner Uşaklı
73505e9bd0 closes #2247 2015-02-25 15:37:33 -05:00
Barış Soner Uşaklı
c94c1430b7 api/post/pid route 2015-02-24 13:02:58 -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
barisusakli
c18de5cdd2 posts/recent.js refactor 2014-11-09 01:30:27 -05:00
barisusakli
06f66337fb anon checks
less db calls for uid 0
2014-11-04 19:06:01 -05:00