Commit Graph

78 Commits (309968bf13df7ef0bdcb05a2049e9a3d49df3b2b)

Author SHA1 Message Date
Barış Soner Uşaklı 69bb3293ee misc fixes
handle spider uids properly
Barış Soner Uşaklı 9c022afae1
Parse int ()
* 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
Julian Lam ebabcc5e3c if authenticate middleware is overridden by plugin, check for req.user and return notAllowed helper otherwise
/cc @LudwikJaniuk
LudwikJaniuk c7f3b76b4e DRY req props that depend on auth (fix ) ()
* DRY req props that depend on auth (fix )

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
Julian Lam 7a53fa9469 Added block and unblock button to profile dropdown menu,
Julian Lam 99f1a5380e closes
Barış Soner Uşaklı beadcd7857 fix tests, remove dupe exposeUid
Julian Lam bfee23adee basic methods and initial integration for
Barış Soner Uşaklı ac1f7eefe5 closes
Baris Usakli c090ec301b fix lint
Barış Soner Uşaklı f7aa32cd05 dont crash if res.session.meta is not set
Barış Soner Uşaklı 7c1f8891a1 use helper
Baris Usakli 2065f895d5 closes
Peter Jaszkowiak f5385e38bf Add `/me*` route which redirects to `/user/[userslug]*` ()
* 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/*`
Baris Usakli 4ac8d29f06 closes
Barış Soner Uşaklı 01e2263c01 more tests
Peter Jaszkowiak 09e868ce5f ESlint no-useless-escape, no-else-return
Peter Jaszkowiak 896c8c7343 ESlint object-curly-spacing
Peter Jaszkowiak 3b0dd2d1ef ESlint padded-blocks
Peter Jaszkowiak 604358ecc4 ESlint keyword-spacing, no-multi-spaces
Peter Jaszkowiak bc1d70c126 ESlint comma-dangle
Julian Lam 2a9088d571 updating checkGlobalPrivacySettings middleware to hook into write-api for auth
barisusakli 2476ab3684 closes
Sergii Paryzhskyi e515b791da Fix eslint rules ()
* Fix semi linter rule

* Fix semi-spacing linter rule

* Fix no-undef-init linter rule

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