79 Commits (44687394dc7c77bbe5ed1f48545aeb0adbbd1e6c)

Author SHA1 Message Date
Barış Soner Uşaklı a288f51f42 fix: allow smaller than 5mins for admin relogin duration
setting the value to 1min in ACP wasn't working
4 years ago
Peter Jaszkowiak 23f212a4c0 chore: eslint prefer-destructuring 4 years ago
Peter Jaszkowiak dab3b23575 chore: eslint no-var, vars-on-top 4 years ago
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback 4 years ago
Peter Jaszkowiak 707b55b6a5 chore: eslint prefer-template 4 years ago
Julian Lam 5f9f241e37 chore: remove deprecated `filter:admin/header.build` hook [breaking]
Use `filter:middleware.renderAdminHeader` instead.
4 years ago
Julian Lam 223f0a5515 feat(acp): admin tags privilege 4 years ago
Julian Lam fb46a8d975 feat(acp): admins-mods privilege 4 years ago
Barış Soner Uşaklı fcc1e24ad0 feat: rename admin middleware header hook 4 years ago
Julian Lam da191341e8 feat(acp): added new admin privilege for groups management 4 years ago
Julian Lam 34ccabe3ab fix: bad assignment logic in middleware.renderHeader 4 years ago
Julian Lam 75b1bbd09f feat: explicitly add filter:admin/header.build hook
As it is not fired during middleware.processRender
4 years ago
Julian Lam 4c87f30184 feat: allow plugins to override ACP relogin challenge
- used in 2factor
4 years ago
Julian Lam 970ccb5a68 fix: #9063, missing handler for passwordless accounts in admin.checkPrivileges middleware 4 years ago
Julian Lam 6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 4 years ago
Julian Lam 87bff6cd65 fix: broken test 5 years ago
Julian Lam dda5d42610 fix: restore old behaviour of empty json w/ 401 code in admin middleware 5 years ago
Julian Lam 15e0731dd9 fix: deprecate middleware.isAdmin
Also, handle admin logout timer in middleware.admin.checkPrivileges
5 years ago
Julian Lam 4b0cb26b34 fix: empty "manage" menu showing in ACP
... if no privileges corresponding to those menu items
are given
5 years ago
Julian Lam cf2f1e956a refactor: changed way middleware was exported 5 years ago
Julian Lam f00595b32d fix: change how admin middlewares are exported 5 years ago
Julian Lam ae68a254d7 fix: one less return, to appease codeclimate 5 years ago
Julian Lam 03bd76dea2 fix: inability to access /admin if not superadmin
There was an odd issue where non-superadmins could not use
the /admin route to access the ACP, even though they had
appropriate access. For whatever reason, it could not
be reliably reproduced on my dev. As it turns out, the
reason was because I was checking the wrong privilege,
and my dev database had this wrong privilege leftover
from the initial development of the ACP admin privileges
feature. Dumb.

Anyhow, that fixes this issue.
5 years ago
Barış Soner Uşaklı a0da2ba774 feat: remove deprecated isAdmin method 5 years ago
Julian Lam a82e9bd7f6
feat: privileges for Admin Control Panel (#8355)
* feat: acp privileges (WIP)

* fix: restore global privilege hooks

* refactor: using cid 0 in admin privs

* fix: no need for zebrastripe-reset

* feat: manage:categories privilege WIP

* feat: renamed prefix to admin:, settigns and dashboard privs

* fix: nofocus on acp privs group find modal

* refactor: privileges.x.get() to not used hardcoded privs

* fix: crash if unable to get latest version

* feat: setting acp priv

* Revert "fix: crash if unable to get latest version"

This reverts commit afdb235f48eb0072d88de45f3a1e0151281095b3.

* feat: user/privilege acp privs

* fix: category selector in manage/privileges

* fix: guests potentially becoming admins

* fix: bug in setting admin privs

* fix: some last minute things + api docs

* fix: some more last minute fixes
5 years ago
Barış Soner Uşaklı dcb85ee7a1
#8344 (#8346)
* feat: wip

* feat: wrap middlewares

* feat: middleware errors

* feat: more middleware changes

* fix: remove unused async

* fix: prevent version errors from blocking acp render

* feat: wrap more middlewares
5 years ago
Julian Lam 023942da7d
refactor: making rendering of header and footer async functions
* refactor: make middleware.admin.renderHeader async

* refactor: making rendering of header and footer async functions

* fix: use app.renderAsync instead of promifying it
5 years ago
Barış Soner Uşaklı 4eaa630b1c refactor: async/await controllers/api 6 years ago
Barış Soner Uşaklı f3a679e268 remove parseInts 7 years ago
Barış Soner Uşaklı d5e85c2eb3 closes #6476, closes #6546 7 years ago
Peter Jaszkowiak eaae5b52cd ACP quick actions (#6374)
* ACP quick actions

- Moved restart, build & restart, and logout into separate buttons
- Moved buttons on mobile into the side menu
- Added version and upgrade alert to header / mobile menu
- Moved version checking to server-side with a cache for rate limiting
- Changed "reload" translations to "rebuild and restart"

* Change info alert to black-on-white to match focused search bar

* Fix tests

* Fallback for failed fetch of latest version
7 years ago
Barış Soner Uşaklı 7b6282f530 closes #6308 7 years ago
Barış Soner Uşaklı a11058bce2 closes #6004 8 years ago
Barış Soner Uşaklı f57b5f4e4c refactor 8 years ago
Barış Soner Uşaklı 01e2263c01 more tests 8 years ago
Peter Jaszkowiak c4bdb72941 ESlint no-unneeded-ternary
and no-extend-native, no-sequences
8 years ago
Peter Jaszkowiak 896c8c7343 ESlint object-curly-spacing 8 years ago
Peter Jaszkowiak a038c66549 ESlint quotes 8 years ago
Peter Jaszkowiak b1b486f729 ESlint quote-props 8 years ago
Peter Jaszkowiak bc1d70c126 ESlint comma-dangle 8 years ago
Peter Jaszkowiak 05b68391dd Use `/assets` for client assets
- Route `/assets` -> `build/public`, falling back on `public`
- Moved destinations for `nodebb.min.js`, `acp.min.js`, `admin.css`, `stylesheet.css`, `templates`, and `sounds` to `build/public`
- r.js modules previously routed through express are now symlinked into `public/build/src/modules`
- minfiles no longer served from a memory cache
- use config `views_dir` setting everywhere template directory is used
- fix cache buster `v=v=`
8 years ago
HeeL 4a3c31b2dc Fix space-before-function-paren linter rule 9 years ago
barisusakli 98fff29869 closes #5082 9 years ago
barisusakli 8f408faf46 organize middlewares
removed app.locals.middleware
middlewares can be required anywhere, ie in controllers
9 years ago
Julian Lam 2e2c8b8e77 fixes #4584 9 years ago
psychobunny 9430a626f4 #3875 9 years ago
psychobunny 9bef54b5ed fix title for dashboard 10 years ago
psychobunny 07c50cba7d titles for ACP routes 10 years ago
barisusakli 75af978145 closes #3646 10 years ago
barisusakli 48512bff6b get rid of app.exposeConfigToTemplates 10 years ago