Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: users and applications CRUD operations, authentication & author…
…ization (#8) * Updated gitignore for MacOS * Nest initial scaffolding, Vite react-ts initial scaffolding, with working auth0 authentication, token creation and axios client * Revert "Nest initial scaffolding," This reverts commit f4edcad. * wiped ci scripts * Setup pnpm workspace * Body validation working Next step authorization * Deleted remnaince of typeorm messup * Authorization using jwt with a global guard (may need revisiting for authorization) * Revert "Authorization using jwt with a global guard" This reverts commit 093356e. * Auth with oauth2 official middleware * Moved auth0 constants to config * Small commit pre-merge * Revert "Revert "Authorization using jwt with a global guard"" This reverts commit 018711c. * Using app guard * Now encoding user role in request, better swagger annotations * In the process of implementing authorization IMPORTANT: changed build system, now both frontend and backend import typescript, compile it, watch it, do their own thing * Fixed preview command with updated compiled file path * First phase of authorization: simple rules next step: - casl + prisma (or other supported orms) to avoid weird logic, and to filter the resource for the rows that are accessible to the current user - oauth0 service to verify that some fields match the user's data on user creation * Added access control to all user routes * avaiabilitiesTable updated * Proper validation with Joi of all request fields & prettier reformat * Integrated previously written frontend with monorepo moved fronted to vite cause speed (and typescript transpiling) Formatting scripts * Moved to env variables with env files instead of yaml config file for the api * Ultima commit di Marco * Application shared validation schemas * Application entities, Create Application DTO * Updated application schema * Applications service and controller * Added /v1 as a prefix to all APIs * Updated shared application validation schemas * Created ApplicationResponseDto Added library to convert from DTOs to entities and viceversa * Added UpdateApplicationDto * Application controller, service, and repository * Added CASL abilities on Applications * Added ApplicationModule to the app modules * Fixed query validation * Updated gitignore * Updated gitignore * Updated gitignore * Updated gitignore * Updated gitignore * Fixed avaiabilities Table placeholder * Added required constraint on updateApplicationSchema, fixed typo * feat(api): Application service unit tests * refactor(api): Switched from fastify to express * feat(api): Upload CV and Grades files to Google Drive Restored GDrive module Added googleapis and google-auth-library * refactor(api): Moved business logic to ApplicationService Remove files from Google Drive if an error occurs while creating the application * Ran prettier * test(api): Create applications of all types, Remove file if error occurs * doc: Restored previous documentation, added API Routes section * test(shared): Application validation, createApplicationSchema validation * test(shared): Validation adn Ability tests for applications * test(api): Applications controller tests * fix: EoL set to 'lf' for system compatibility * fix(api): modified mocks for timers * Avaiabilities table fix * Commit * Tentativo di comunicazione col backend * feat(shared): Slot, TimeSlot, Availability interfaces * test(shared): Availability update schema * Decoding access token * Disabled google tests; formatted frontend * Attempt to replace placeholders in the fill variable with interviews * fix: Updated broken imports * fix(server): TypeORM single table inheritance discriminator field * test(server): updated Applications tests to account for new returned fields * feat(server) Timeslot controller: POST and DELETE timeslots, with tests * refactor: uncommented tests, added .skip to not execute them * fix: pnpm version mismatch --------- Co-authored-by: Vincenzo Pellegrini <[email protected]> Co-authored-by: Marco Pappalardo <[email protected]> Co-authored-by: Marco De Luca <[email protected]>
- Loading branch information