27 Commits (afa84023a2881891d0f6f0e3f0ef52338594c902)

Author SHA1 Message Date
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
6 years ago
Julian Lam ebabcc5e3c if authenticate middleware is overridden by plugin, check for req.user and return notAllowed helper otherwise
/cc @LudwikJaniuk
7 years ago
LudwikJaniuk c7f3b76b4e DRY req props that depend on auth (fix #6727) (#6731)
* DRY req props that depend on auth (fix #6727)

authentication leads to req.loggedIn and req.uid being set. However, a
later authentication event might outdate them. Here, I create one
function for setting those properties, and make sure it also is called
on the `action:middleware.authenticate` hook, which would be such an
authentication event. If there are other places, those should be added
as well.

* fix lint errors

* fix lint error

* change exports
7 years ago
Julian Lam 7a53fa9469 Added block and unblock button to profile dropdown menu, #6560 7 years ago
Julian Lam 99f1a5380e closes #6483 7 years ago
Barış Soner Uşaklı beadcd7857 fix tests, remove dupe exposeUid 7 years ago
Julian Lam bfee23adee basic methods and initial integration for #6463 7 years ago
Barış Soner Uşaklı ac1f7eefe5 closes #2304 7 years ago
Baris Usakli c090ec301b fix lint 7 years ago
Barış Soner Uşaklı f7aa32cd05 dont crash if res.session.meta is not set 7 years ago
Barış Soner Uşaklı 7c1f8891a1 use helper 7 years ago
Baris Usakli 2065f895d5 closes #6037 7 years ago
Peter Jaszkowiak f5385e38bf Add `/me*` route which redirects to `/user/[userslug]*` (#6063)
* Add `/me*` route which redirects to the current user's information

- `/me` -> `/user/[usertslug]`
- `/me/bookmarks` -> `/user/[userslug]/bookmarks`
- `/me/settings` -> `/user/[userslug]/settings`

etc

* Add tests for `/me/*`
7 years ago
Baris Usakli 4ac8d29f06 closes #5847 8 years ago
Barış Soner Uşaklı 01e2263c01 more tests 8 years ago
Peter Jaszkowiak 09e868ce5f ESlint no-useless-escape, no-else-return 8 years ago
Peter Jaszkowiak 896c8c7343 ESlint object-curly-spacing 8 years ago
Peter Jaszkowiak 3b0dd2d1ef ESlint padded-blocks 8 years ago
Peter Jaszkowiak 604358ecc4 ESlint keyword-spacing, no-multi-spaces 8 years ago
Peter Jaszkowiak bc1d70c126 ESlint comma-dangle 8 years ago
Julian Lam 2a9088d571 updating checkGlobalPrivacySettings middleware to hook into write-api for auth 8 years ago
barisusakli 2476ab3684 closes #5202 8 years ago
Sergii Paryzhskyi e515b791da Fix eslint rules (#5117)
* Fix semi linter rule

* Fix semi-spacing linter rule

* Fix no-undef-init linter rule

* Fix space-before-blocks linter rule
9 years ago
barisusakli a995afbfe0 fix style 9 years ago
Julian Lam 2463e85c0d allowing moderators access to the account info page 9 years ago
HeeL 4a3c31b2dc Fix space-before-function-paren linter rule 9 years ago
barisusakli 8f408faf46 organize middlewares
removed app.locals.middleware
middlewares can be required anywhere, ie in controllers
9 years ago