Skip to content

Commit

Permalink
Fix/179 pass allowed errors to nested crud handlers (#208)
Browse files Browse the repository at this point in the history
* Team invitation (#171)

* team invitation wip

* implemented handler

* team invitation callback wip

* added team invitation frontend

* fixed listCurrentUserTeamPermissions

* added team invitation email template

* fixed bugs

* fixed verification code handler

* added more checks to team invitation verification

* fixed team invitation page

* restructured verification code handler

* fixed frontend

* fixed team invitation tests

* added more team invitation test

* fixed bug

* added migration file

* removed unused code

* Allow Next.js version `latest` in package.json

* Fix typo

* Update error message

* Remove unnecessary console.warn

* Updated "edit this page" button

* Hide unsupported properties from docs

* OAuth token tests

* Fix typo

* added create user button (#173)

* Create SECURITY.md

* Export button in tables

* Export all pages of tables

* Update security policy

* Fix docs typo

* More docs typos

* Improved user creation handlers

* Fix: Improve error handling for Server API (#170)

* Added entity checks to provide better errors in API for 'server' access type

* Removed 'ensureUserTeamPermissionExist', changed permissionId type to string in 'ensureUserHasTeamPermission'

* added different error types for user team permission

---------

Co-authored-by: Fahad Khan <[email protected]>
Co-authored-by: Zai Shi <[email protected]>

* Sign up restriction button on dashboard

Fix #66, #74

* Fix type error

* TOTP 2FA endpoints

* TOTP MFA components

* Improved description for disabling sign ups

* Added 'allowedErrorTypes' for error propagation

---------

Co-authored-by: Zai Shi <[email protected]>
Co-authored-by: Stan Wohlwend <[email protected]>
Co-authored-by: Fahad Khan <[email protected]>
  • Loading branch information
4 people authored Aug 28, 2024
1 parent b5009ca commit 57bc32d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/backend/src/app/api/v1/users/crud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export const currentUserCrudHandlers = createLazyProxy(() => createCrudHandlers(
return await usersCrudHandlers.adminRead({
project: auth.project,
user_id: auth.user?.id ?? throwErr(new KnownErrors.CannotGetOwnUserWithoutUser()),
allowedErrorTypes: [Error],
allowedErrorTypes: [StatusError]
});
},
async onUpdate({ auth, data }) {
Expand All @@ -345,14 +345,14 @@ export const currentUserCrudHandlers = createLazyProxy(() => createCrudHandlers(
project: auth.project,
user_id: auth.user?.id ?? throwErr(new KnownErrors.CannotGetOwnUserWithoutUser()),
data,
allowedErrorTypes: [Error],
allowedErrorTypes: [StatusError]
});
},
async onDelete({ auth }) {
return await usersCrudHandlers.adminDelete({
project: auth.project,
user_id: auth.user?.id ?? throwErr(new KnownErrors.CannotGetOwnUserWithoutUser()),
allowedErrorTypes: [Error],
allowedErrorTypes: [StatusError]
});
},
}));

0 comments on commit 57bc32d

Please sign in to comment.