Commit Graph

8782 Commits

Author SHA1 Message Date
Morgan 022e423fd2
feat: external gcal (#12954)
* wip connect gcal

* feat: add external google calendar

* fixup! feat: add external google calendar

* fix: google calendar oauth check invalid

* google cal check tests

* use zod

* fix: await validate access token service
2023-12-29 10:48:51 +02:00
Lauris Skraucis ebebf8e22e
refactor: access token errors (#12932)
* change error messages

* error message if access token does not exist in our database

* token expired 498

* access token expired message as constant

* store 498 status code as const

* fix: access token error less information given

* chore: invalid access token const

---------

Co-authored-by: Morgan Vernay <morgan@cal.com>
2023-12-29 10:44:27 +02:00
Lauris Skraucis 2df15d1d0a
feat: endpoint for deleting oAuth users & oAuth users returned data (#12912)
* feat: delete oAuth users

* check if access token matches userId in parameter

* driveby: return only user id and email in oauth users endpoints
2023-12-22 12:53:42 +01:00
Lauris Skraucis d4c946a0d6
refactor: v2 API (#12913)
* Use Boolean only instead of git add src/modules/auth/guard/organization-roles/organization-roles.guard.ts

* move tests next to files they test

* replace .. in import paths with absolute path

* camelCase instead of snake_case for access and refresh token variables

* user sanitize function Typescript friendly

* restructure oAuth clients folder: example for other folders

* restructure bookings module

* organize modules in auth, endpoints, repositories, services

* organize auth module

* organize repositories

* organize inputs

* rename OAuthClientGuard to OAuthClientCredentialsGuard

* add error messages

* add error messages

* clientId as param in oauth-flow & schema mapping

* camelCase instead of snake_case for clientId and clientSecret

* access token guard as passport strategy

* folder structure as features

* get rid of index files
2023-12-22 12:09:25 +01:00
Lauris Skraucis e18eb6bc4b
feat: CRUD for oAuth users (#12853)
* user controller with oauth guard

* crud repository and controller operations

* add user controller to user module

* refactor: oauth guard

* connect user with oauth client upon creation

* fix: test

* wip: e2e test

* refactor: findUniqueOrThrow -> findUnique user

* test: POST user request

* feat: permissions guard

* e2e tests

* e2e

* e2e refactor

* e2e refactor

* reflector decorator check refactor

* refactor oauth guard

* remov unused imports

* log message

* delete permissions decorator and guard

* remove delete user endpoint

* remove delete user endpoint

* refactor: route structure

* remove get oauth client decorator

* delete unecessary e2e config changes

* remove set header in post test

* fix: oauth guard test on empty db

* revert: add previously removed constant to fulfill merge platform

* fix: import to satisfy platform branch merge

* use real implementation of access token guard

* generate access & refresh tokens and fix e2e

* fix: oauth client e2e test

* refactor: variable naming

* refactor

* rename test file

* remove oauth client from request
2023-12-21 14:01:41 +02:00
Morgan Vernay 9ef24864b8 fixup! chore(platform): OAuth Flow (#12798) 2023-12-20 19:13:56 +01:00
Erik 0830f3304e
chore(platform): OAuth Flow (#12798) 2023-12-20 15:03:26 -03:00
Rajiv Sahal b987f6ea4d
feat: platform oAuth clients frontend (#12867)
* add oauth client to settings

* fix imports

* add react and axios

* oauth client form and card components

* hooks for oauth clients data

* index page for oauth clients

* oauth client list component

* oauth client form page

* shift atoms into platform

* init platform folder

* refactor handleSubmit functioin

* platform

* platform

* platform parts

* revert tsconfig constant platform

* fix: useOauthClients

* feat: create oauth client with api

* fix: add prettier to platform type package

* fixup! fix: add prettier to platform type package

* chore: class-validator types in platform package

* add types for delete oauth client iput

* add onSuccess and onError methods

* update oauth client card view with client id and secret

* cleanup comments

* split oauth persisit hook into create and delete hooks

* fix: oauth client creation / deletion / listing

* fixup! fix: oauth client creation / deletion / listing

* fix: comment logo for now

* fix: layout setting org keys

* cleanup comments

* minor style fixes, add logic for client permissions

* show toast after deleting client

* not passing clint logo at the moment

---------

Co-authored-by: Morgan Vernay <morgan@cal.com>
2023-12-19 15:02:11 +01:00
Lauris Skraucis 64e1658832
feat: oauth client guard (#12814)
* feat: oAuth client guard

* refactor test

* refactor: move oauth-client guard to oauth module

* refactor: separate jest config from package.json

* fix: resolving paths in jest tests

* fix: tests

* jest setup file

* fix: jest test warnings about .js platform constants imports

* refactor: test repository fixtures

* remove allowjs

* ignore js files in ts-jest

* make oauth client module global

* make oauth client module global
2023-12-18 12:09:46 +01:00
Morgan Vernay f1c7f5dac0 fix yarn.lock 2023-12-14 12:16:44 +02:00
Morgan Vernay f847d1721f Merge branch 'main' into platform 2023-12-14 11:54:44 +02:00
Morgan Vernay e5d3bc5a0b chore: rename repositories 2023-12-14 10:47:51 +02:00
Amit Sharma 60700e1a7a
fix: padding off event user avatar (#12733) 2023-12-13 20:16:19 -08:00
Peer Richelsen 456adea570
Update semantic-pull-requests.yml 2023-12-13 20:05:52 -08:00
Manavpreet Singh 63abda1693
chore: changed checkbox color (#12783)
Co-authored-by: ManavpreetSingh <119919977+manavpreetsingh@users.noreply.github.com>
2023-12-13 19:29:37 -08:00
sean-brydon 4dd73f4d86
fix: Add scroll to troubleshooter sidebar (#12785) 2023-12-13 19:29:13 -08:00
Peer Richelsen 31caf8288d
feat: roam (ro.am) conferencing (#12579) 2023-12-14 02:19:22 +00:00
Hariom Balhara 99e71365ab
fix: Disallow changing username and email in case of Organization email invite (#12735)
Co-authored-by: Omar López <zomars@me.com>
2023-12-13 20:08:16 +00:00
Somay Chauhan 943c7a4c6c
fix: other team members page invite issue (#12745) 2023-12-13 19:53:20 +00:00
sean-brydon 228e509a3b
Inter 4.0 (#12766) 2023-12-13 16:18:50 +00:00
Morgan 0af1a74d09
chore: move repos to feature folder (#12769) 2023-12-13 13:36:26 +02:00
Morgan d334547ac0
chore: OAuth clients tests and fixes (#12762)
* chore: add tests and fixes

* fixup! chore: add tests and fixes

* fixup! fixup! chore: add tests and fixes

* fixup! fixup! fixup! chore: add tests and fixes

* fixup! fixup! fixup! fixup! chore: add tests and fixes

* fixup! fixup! fixup! fixup! fixup! chore: add tests and fixes

* fixup! fixup! fixup! fixup! fixup! fixup! chore: add tests and fixes

* fix: remove unused imports
2023-12-13 12:59:29 +02:00
sean-brydon eb909cc87a
fix: datatable toolbar (#12757)
* Fix toolbar

* Slide animation

* Animate out and fix selection model

* Disable on mobile - fix tablet position

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-13 10:15:18 +00:00
Morgan Vernay 104f6eb38a Merge branch 'main' into platform 2023-12-13 10:36:01 +02:00
Peer Richelsen 65a36b37c5
removed org_team_names_example_1 (#12759) 2023-12-13 13:08:59 +05:30
Alex van Andel 2799ddf3a4
fix: 500 error on email conflict (#12725) 2023-12-13 02:24:36 +00:00
Carina Wollendorfer 3164cd4ae7
feat: mandatory email reminder for attendees with @gmail.com (#12747)
Co-authored-by: Chiranjeev Vishnoi <somu209e@gmail.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-12-13 02:23:48 +00:00
Udit Takkar 6b26dbc6da
fix: checkbox color (#12742)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-13 02:19:12 +00:00
Hariom Balhara 6b09c6b3b4
fix: Allow lowercase/uppercase/mixedcase access with org team event booking page (#12721)
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
2023-12-12 18:02:38 -08:00
Keith Williams 2352bb1075
chore: Wire up Sentry for API (#12756) 2023-12-12 14:57:39 -08:00
DmytroHryshyn a568e1ac66
chore: [app-router-migration-5] apps/installed page (#12618)
Co-authored-by: zomars <zomars@me.com>
2023-12-12 12:48:40 -07:00
DmytroHryshyn add6ffdfc4
chore: [app-router-migration-4]: apps/categories page (#12619) 2023-12-12 11:43:15 -07:00
Alex van Andel 7a67331d96
fix: Disable source maps which looks to be infinitely looping (#12744) 2023-12-12 16:16:04 +00:00
Amitabh Sahu 1aa8b8439a
fix: change booking page filter ui to match Figma (#12134)
* fix: change booking page filter ui to match figma

* fix: style change for filters in mobile

* made all changes requested by reviewers

* fix: add clear filter

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
2023-12-12 11:29:13 +00:00
Morgan 5463233762
chore: create authenticated user guard (#12677)
* chore: wip next-auth-guard for apiv2

* refactor: use NextAuthGuard on all OAuthClientController routes

* refactor: use passport to get next user

* exclude password from prisma read service

* Revert "exclude password from prisma read service"

This reverts commit 24b1f8ed59.

* fix: userRepo sanitize password

* refactor: function order in UserRepository

* implement user repository service

* refactor: strict null checks for TS

* refactor: fix strict null checks

* delete res locals type

* refactor: switch from zod to class-validator for oAuth client

* refactor: switch from zod to class-validator for booking

* refactor: rename dtos folder to input folder

* fix: create migration for prisma schema oauth clients table

* feature: post oAuth client

* refactor: rename oAuth client_secret to secret

* stricter ts config + oauth secret

* remove migrations

* fix: improve response type

* improve error code types

* fix: prettier by removing eslint as its not needed

* refactor: eslint fix files

* wip organization oauth_lcient

* fix import types

* fix team schema platformOAuthClient name

* fix: import packages transpiled

* feat: roles guard

* refactor: use organisationId instead of userId

* fix: jwt secret signing not having jwt_secret

* fix: stop importing input DTOs as types

* fix: jwt sign expecting plain object

* add sentry, routes logger, generic response type

* fix test config

* fixup! fix test config

* refactor: dont await async function return

* feat: fallback value for getEnv

* feat: add helmet for security

* feat: organization guard

* refactor: check if user set in RolesGuard

* refactor: remove roles requirement for oauth read

* chore: add exceptions filters

* fix: api key strategy throws errors

* chore: set e2e tests

* chore: centralize api type in package

* feat: user repository relations

* feat: user repository relations

* Revert "feat: user repository relations"

This reverts commit 1802b256b5.

* Revert "feat: user repository relations"

This reverts commit 4a8f52583d.

* test: mock next auth

* fixup! test: mock next auth

* test:oAuth  authed user but no org

* refactor: remove unused type

* refactor: organisation guard based on Membership table

* refactor: folder and file structure

* fix: small changes exception filters

* refactor: merge organization and roles guards into one guard

* fix: remove old export

* fix: org roles guard

---------

Co-authored-by: supalarry <lauris.skraucis@gmail.com>
2023-12-12 11:27:04 +02:00
Alex van Andel 50e405353c v3.5.5 2023-12-11 23:11:43 +00:00
Alex van Andel 565e21bc50
fix: Dynamic duration was always overwritten with the default (30) (#12444)
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2023-12-11 16:07:21 -07:00
DmytroHryshyn 098d41fc62
chore: [app-router-migration-3] apps/[slug]/index, apps/[slug]/setup (#12620)
Co-authored-by: Omar López <zomars@me.com>
2023-12-11 16:05:07 -07:00
Patrick Arminio a20179727b
Hide expires on message if never expires is selected (#12723) 2023-12-11 17:15:56 +00:00
sean-brydon 795aaca64f
Trim spaces on datatable search key (#12713) 2023-12-11 06:58:26 +00:00
Mehul 2ab7846a4a
fix: location Select auto focus (#12715) 2023-12-09 20:53:49 +00:00
Udit Takkar e9ea0fcc20
feat: add cal video logo whitelabel for organization (#12616) 2023-12-09 09:02:14 +00:00
Hariom Balhara 090b166b1c
Update PULL_REQUEST_TEMPLATE.md (#12711) 2023-12-08 17:24:41 +00:00
Bijoy Sijo ea2d8fc873
docs: Remove duplicate CALENDSO key setup from README. (#12595) 2023-12-08 07:23:21 -08:00
Ethan Chen 46c51df1e0
fix: Up libphonenumber-js to fix #12394 (#12519)
* Up libphonenumber-js

* Re-patch libphonenumber-js and restore the test files.

* fix: yarn and check

* Conflict Resolution

* fix lint error

* Restore files

* Fix yarn.lock

---------

Co-authored-by: Hariom <hariombalhara@gmail.com>
2023-12-08 14:09:45 +00:00
Guilherme Santos 5fe919452b
test: Make sure response is still writable before setting headers (#12478) 2023-12-08 18:56:49 +05:30
nicktrn 83c8f97afd
test: booking and duration limits e2e (#10968)
* test: booking and frequency limits e2e

* test: refactor limit e2e and check multiple

* test: move limits e2e to separate file

* fix: blocked day assertions

* chore: rename to booking-limits

* fix: use todo test util

* chore: un-DRY tests

* feat: create user with limits helper

* chore: move user limit helper to utils

* fix: multiple limits test

* feat: fail faster

* chore: event url helper

* fix: prismock count date comparisons

* chore: improve booking limit types in test utils

* test: add typed weekStart to getOrganizer helper

* test: add custom fromDate to getDate helper

* fix: correctly handle negative date increments

* test: add helper for partial weeks

* test: booking limits edge cases

* chore: remove booking limit e2e todos

* chore: normalize getDate return type and skip test

* Fix imports paths that are changes after main merge

* Fix failing types

* Skip failing test

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
2023-12-08 10:23:31 +00:00
Carina Wollendorfer f87eac193f
fix: rr-host booked outside of availability (#12704)
* correctly query overlapping bookings

* remove console.log

* fix getting busy bookings for getAvailableSlots

---------

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-12-08 01:31:02 +00:00
Aswath S c53e891c8a
fix: refactor booking details api middleware to use team member booking join (#12695)
* refactor booking details api middleware to use team member booking join

Signed-off-by: titanventura <aswath7862001@gmail.com>

* fix. security issue in previous commit. check for booking against current user. then check for team booking

Signed-off-by: titanventura <aswath7862001@gmail.com>

---------

Signed-off-by: titanventura <aswath7862001@gmail.com>
2023-12-07 22:43:51 +00:00
Udit Takkar 90a6fc3f26
refactor: Top Banner and add google calendar credential banner (#12532)
Fixes: https://github.com/calcom/cal.com/issues/12473

TODO:
- [x] Fix Type error

<img width="1512" alt="Screenshot 2023-12-02 at 12 47 19 AM" src="https://github.com/calcom/cal.com/assets/53316345/8a5c6dd0-6095-482b-b4d0-81653607a270">


<img width="1512" alt="Screenshot 2023-12-02 at 12 47 39 AM" src="https://github.com/calcom/cal.com/assets/53316345/fc64edb9-27b3-438f-b42d-75b200ac96e9">
2023-12-07 15:32:47 -07:00