Commit Graph

254 Commits

Author SHA1 Message Date
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ı
153456278b feat: show error if json is invalid 2020-04-17 13:24:52 -04:00
Opliko
b9583ed838 Add privilege for accessing user information (#7859)
* Add view users info global privilege

* Show user ip only to global mods and admins

* fix missing comma

* Hide link for users without correct privilege

* move getting privilege information to getAllData

* Hide the link from Global Moderators as well

* Give Global Moderator view:users:info privilege

* Restrict ip in post menu to view:users:info

* add some trailing commas....

* Add privilege to categories test

* Add group privilege to categories test

* add upgrade script

* fix style for TravisCI

* more styling - change spaces to tabs

* some more styling fixes (hopefully final one)

* fix style for Travis CI

* hide ip in chat messages

* Don't show even hidden ips on user profile page
2019-09-17 14:02:52 -04:00
Barış Soner Uşaklı
198d05875f feat: cleanup, use bulk 2019-06-24 21:36:20 -04:00
Barış Soner Uşaklı
5fa5e999f8 Plugin metrics (#7626)
* feat: add enable/disable checkbox for plugin usage

* feat: submit plugin data to packages.nodebb.org

only submit in production mode
submit once every 24 hours
dont submit for plugins that have "private": true in plugin.json
enabled on new installs
disabled on existing installs

* fix: hash not working after first send

fix statusCode

* fix: remove url

* feat: show compatibilty

* feat: add install question for submit plugin usage
2019-06-07 14:10:44 -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ı
fe63fca846 fix: remove debug logs 2019-02-09 14:32:44 -05:00
Barış Soner Uşaklı
bcd62586e2 fix: database 0 was being replaced with undefined because 0 is falsy 2019-02-09 13:41:34 -05:00
Barış Soner Uşaklı
ba90bf3114 feat: check overide 2019-02-09 13:13:42 -05:00
Barış Soner Uşaklı
f2d7f75ee2 feat: check CI failure 2019-02-09 12:23:10 -05:00
Barış Soner Uşaklı
cd1209906d fix: give default privs on new install to guests/spiders 2019-02-05 12:14:02 -05:00
Barış Soner Uşaklı
c72da5595a fix: #6806
3 new global privileges
view:users
view:tags
view:groups
2019-02-05 12:08:18 -05:00
Barış Soner Uşaklı
53ad2bbd6e Categories optimize (#6999)
* WIP

* fix category page

* fix counts, and copyPrivileges

* fix lint

* more fixes,

* redis fix

* fix test

* fix  category test

* remove getParentsAndChildren
2018-11-25 19:08:38 -05: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ı
77beaf2e15 Allow local login,closes #6800 (#6803)
* WIP

* reset groups cache after every suite
2018-09-29 06:49:41 -04:00
Ben Lubar
33228bb7fe PostgreSQL database driver (#5861)
* [test/database/list] Fix test list 4 being used in two different tests

* [database/postgres] PostgreSQL database driver

* [database/postgres] Make transactions work based on continuation scope.

* [database/postgres] Implement nested transactions

* eslint --fix

* Add database changes from earlier this week to the PostgreSQL driver.

* Fix typo

* Fix postgres.incrObjectFieldBy returning undefined instead of null when given NaN

* [database/postgres] Fix sortedSetsCard returning an array of strings.

* Update socket.io postgres adapter

* Fix PostgreSQL erroring when multiple updates are made to the same sorted set entry in a single operation.

Add a test case to catch this error.

* Fix lint errors.

* Only prune sessions on one instance in a cluster to avoid deadlocks.

They're caught and handled by the database server, but they spam the logs.

* Fix arguments.slice.
2018-08-08 15:13:48 -04:00
Barış Soner Uşaklı
a7267df404 closes #6464 2018-05-28 11:29:41 -04:00
Julian Lam
23f84f53c2 fix subfolder url for web installer 2018-05-24 16:01:08 -04:00
Julian Lam
542f8e6e15 added back install.overrides 2018-05-15 15:45:58 -04:00
Julian Lam
943d33ed09 closes #6502, also fixed issue with type: 'literal' in config.json 2018-05-15 15:26:06 -04:00
Julian Lam
7ba2ac9f69 Merge remote-tracking branch 'origin/master' into develop 2018-04-11 16:30:03 -04:00
Julian Lam
2b35ba8376 save package_manager into config.json if set in setup.json 2018-04-11 11:53:33 -04:00
Barış Soner Uşaklı
0070f5c1b2 Merge remote-tracking branch 'refs/remotes/origin/master' into develop 2018-04-05 12:34:38 -04:00
Barış Soner Uşaklı
925d858fe6 dont json.parse if already array 2018-03-22 18:33:35 -04:00
Barış Soner Uşaklı
e1c6761087 closes #6258 2018-02-28 17:38:31 -05:00
Barış Soner Uşaklı
e092778ba6 closes #6200 2018-01-15 15:05:33 -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
Peter Jaszkowiak
fc19f3af61 Misc fixes and improvements (#6143)
* `setup` command fixes and improvements

- Enable using the `./nodebb setup` command for auto-setup with a JSON argument
- Change CLI so package-install and dependency install are separate steps
- Fix #6142

* Prevent compiling templates multiple times

- Multiple requests for same template get pooled
- Hopefully fixes the "templateFunction is not a function" error which happens if site is restarted during high-traffic times

* More helpful upgrade template
2017-12-04 15:49:44 -05:00
Peter Jaszkowiak
a849a772bf Use emoji v2 instead of emoji-extended (#5800) 2017-11-28 11:10:47 -05:00
Peter Jaszkowiak
dbdc05404d Use console.log instead of process.stdout.write (#6123)
* Use console.log instead of process.stdout.write

* Don't break the installer
2017-11-27 15:44:30 -05:00
Peter Jaszkowiak
c47c47f7e3 Use less memory to build translation files (#6070)
* Change languages build to use less memory

Add graceful-fs so no ned to worry about fs limits

* Specify encoding for fs.readFile

Use eachLimit since graceful-fs handles that now
2017-11-16 17:43:52 -05:00
Peter Jaszkowiak
e609e497b3 Provide more error information to logs
Provides full stack instead of just message
2017-11-01 18:59:48 -06:00
Baris Usakli
8a499e09ed fix nconf lowercasing 2017-10-16 13:51:47 -04:00
Barış Soner Uşaklı
890c2eff70 style changes 2017-05-27 01:44:26 -04:00
Julian Lam
d18cfced96 Merge remote-tracking branch 'origin/master' into develop 2017-04-12 23:57:14 -04:00
Peter Jaszkowiak
1ed571189c Make utils and translator easier to require
Move utils.walk to file.walk, backwards compatible
2017-04-08 20:27:52 -06:00
Julian Lam
93c96da0b9 adjusted upgrade check logic for instances with no schemaLog 2017-02-26 16:26:53 -05: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
a038c66549 ESlint quotes 2017-02-18 01:56:23 -07:00
Peter Jaszkowiak
604358ecc4 ESlint keyword-spacing, no-multi-spaces 2017-02-18 01:52:56 -07:00
Peter Jaszkowiak
277a7fb8b4 ESlint key-spacing, no-trailing-spaces 2017-02-18 01:27:46 -07:00
Peter Jaszkowiak
b1b486f729 ESlint quote-props 2017-02-18 01:19:20 -07:00
Peter Jaszkowiak
d1101a7fb4 ESlint dot-notation
and func-call-spacing
2017-02-18 00:21:44 -07:00
Peter Jaszkowiak
879470f417 ESlint brace-style 2017-02-17 22:11:35 -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
Anil Mandepudi
aea08d58b1 Fix tabs 2016-12-12 17:19:59 -08:00
pichalite
0a4e45c0da Check password length on setup 2016-12-13 01:18:42 +00:00