Commit Graph

36 Commits (45ca046533e737c5291ff8dd1f62f2aa3ee6ae9f)

Author SHA1 Message Date
Julian Lam ad63517511 fix: missing early return
Julian Lam 936562c3cb fix: handle case where email is explicitly passed into user.create, and thus is set in user hash, but confirmation request may have expired
Julian Lam 0322e984e0 fix: , don't check email:uid, instead verify an email confirmation is active
Barış Soner Uşaklı 2a89ad8288 fix: use escaped group names in invite modal
Julian Lam d098e26f82
User Email and email validation API ()
* feat: wip user emails api

* fix: allow admins with manage-users access to email confirmation api as well

* fix: wrong route path

* docs: openapi spec
Julian Lam 0a41741b7e refactor: deprecate picture update socket call, new API routes for picture update
Barış Soner Uşaklı 9de64bf516 fix: , pass along query params in redirect
gasoved 97c8569a79 fix: hide private user data in api/v3/users/[uid]
Julian Lam d2960aeb09 feat: added GET user route for api v3
Peter Jaszkowiak 23f212a4c0 chore: eslint prefer-destructuring
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback
Peter Jaszkowiak 707b55b6a5 chore: eslint prefer-template
Julian Lam a0b7a82350
feat(api): account deletion routes for the Write API ()
* feat(api): account deletion routes for the Write API

* refactor: rewrite client-side calls to account deletion to use api

* style: apply DRY
gasoved 3ccebf112e
feat: invites regardless of registration type, invite privilege, groups to join on acceptance ()
* feat: allow invites in normal registration mode + invite privilege

* feat: select groups to join from an invite

* test: check if groups from invitations have been joined

* fix: remove unused variable

* feat: write API versions of socket calls

* docs: openapi specs for the new routes

* test: iron out mongo redis difference

* refactor: move inviteGroups endpoint into write API

* refactor: use GET /api/v3/users/:uid/invites/groups

Instead of GET /api/v3/users/:uid/inviteGroups

* fix: no need for /api/v3 prefix when using api module

* fix: tests

* refactor: change POST /api/v3/users/invite

To POST /api/v3/users/:uid/invites

* refactor: make helpers.invite awaitable

* fix: restrict invite API to self-use only

* fix: move invite groups controller to write api, +tests

* fix: tests

Co-authored-by: Julian Lam <julian@nodebb.org>
Barış Soner Uşaklı f14e42d8bc fix:
Julian Lam f300c933a5 refactor: move session revocation route to write api
Julian Lam 6b196a207f fix: permanent redirect on user api redirect shorthand
Julian Lam 60e1e99b4f feat: new shorthand route /api/v3/users/bySlug/:userslug
closes 
Julian Lam 891a1ea2af fix: , do not require admin:users privilege to ban users
Julian Lam 266d7587b2 refactor: remove usage of middlewares
Specifically, middleware.isAdmin|exposePrivilegeSet|exposePrivileges
Julian Lam aa8faf58a0 refactor: remove /users/{uid}/settings/{setting} route
@baris Also, I am now allowing the following properties to be saved in User.saveSettings:
- categoryTopicSort
- topicPostSort
- setCategorySort
- setTopicSort
Julian Lam 618e098305 fix: bug where token generation route would fail on null case
Julian Lam c26f2b6599 feat(writeapi): user settings API
Julian Lam 2d252f2fa4 refactor: user bans to use api lib
Julian Lam 960e925e40 refactor: change password/user follow to use api lib
Julian Lam 430e7f5834 refactor: user deletion to use api lib
Julian Lam 31ae8a8323 refactor: socket profile update to use api lib
Julian Lam 23086daead refactor: user create and profile update to use api lib
Julian Lam cc6e995ee2 fix: api bug where user profile editing continued even if not allowed
Julian Lam 2ec838fc59 feat(writeapi): token generation/delete routes, ACP updates
Julian Lam 7757f965eb fix: errors thrown if no password sent in to profile edit route
Julian Lam a5af2dc819 feat: added PUT/DELETE /api/v1/users/:uid/ban routes
Julian Lam b5bbcbaeaa feat: added POST and DELETE /api/v1/users/:uid/follow routes
Julian Lam 7aed174ebc feat: added PUT /api/v1/users/:uid/password route
Julian Lam a1ddc210b2 feat: added DELETE /api/v1/users/:uid and DELETE /api/v1/users
Julian Lam d15d9e4492 fix(refactor): patching helpers.tryRoute for API routes, some re-org
Thanks @barisusakli for the tip