Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: organizations teams endpoints apiv2 #15586

Merged
merged 10 commits into from
Jun 27, 2024

Conversation

ThyMinimalDev
Copy link
Contributor

@ThyMinimalDev ThyMinimalDev commented Jun 26, 2024

What does this PR do?

/organizations/:orgId/teams/:teamid - isOrganizationGuard- (maybe team owners)

GET - RolesGuard (ADMIN) - Get all teams within the organization

POST - RolesGuard (ADMIN) - Create a team within the organization (The key here would be to ensure the slug uniqueness check is local to the organization and not system wide)

PATCH - RolesGuard (ADMIN) - Can only patch a team that is part of the organization

DELETE - RolesGuard (ADMIN) - Can only delete a team already part of the organization

All the prisma calls to fetch / create / delete / patch the teams, should use the orgId provided in the request url, in the parentId field of the team

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have added a Docs issue here if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

yarn test:e2e organizations-teams.controller.e2e-spec.ts

@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Jun 26, 2024
Copy link

vercel bot commented Jun 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Jun 27, 2024 2:43pm
cal ⬜️ Ignored (Inspect) Visit Preview Jun 27, 2024 2:43pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jun 27, 2024 2:43pm

@ThyMinimalDev ThyMinimalDev marked this pull request as ready for review June 27, 2024 10:40
@graphite-app graphite-app bot requested review from a team June 27, 2024 10:40
@dosubot dosubot bot added api area: API, enterprise API, access token, OAuth organizations area: organizations, orgs ✨ feature New feature or request labels Jun 27, 2024
Copy link

graphite-app bot commented Jun 27, 2024

Graphite Automations

"Add foundation team as reviewer" took an action on this PR • (06/27/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add platform team as reviewer" took an action on this PR • (06/27/24)

1 reviewer was added to this PR based on Keith Williams's automation.

@emrysal emrysal added this pull request to the merge queue Jun 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2024
@ThyMinimalDev ThyMinimalDev enabled auto-merge June 27, 2024 14:34
Copy link
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Twelve Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/apps/[slug]/[...pages] 593.34 KB 821.04 KB 234.58% (🟡 +0.20%)
/auth/saml-idp 12.22 KB 239.92 KB 68.55% (🟢 -20.80%)
/event-types 566.37 KB 794.07 KB 226.88% (🟡 +0.28%)
/event-types/[type] 442.02 KB 669.72 KB 191.35% (🟡 +0.14%)
/settings/admin/lockedSMS/UsersTable 79.91 KB 307.61 KB 87.89% (🟢 -0.16%)
/settings/admin/lockedSMS/lockedSMSView 119.39 KB 347.09 KB 99.17% (🟢 -0.19%)
/settings/admin/oAuth/oAuthView 95.44 KB 323.14 KB 92.33% (🟢 -0.19%)
/settings/organizations/[id]/about 159.6 KB 387.3 KB 110.66% (🟡 +0.45%)
/settings/organizations/[id]/add-teams 159.59 KB 387.29 KB 110.65% (🟡 +0.46%)
/settings/organizations/new 159.6 KB 387.3 KB 110.66% (🟡 +0.45%)
/settings/platform/new 120.65 KB 348.34 KB 99.53% (🟡 +0.50%)
/video/[uid] 290.75 KB 518.44 KB 148.13% (🟢 -0.31%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@ThyMinimalDev ThyMinimalDev added this pull request to the merge queue Jun 27, 2024
@ThyMinimalDev ThyMinimalDev removed this pull request from the merge queue due to a manual request Jun 27, 2024
@ThyMinimalDev
Copy link
Contributor Author

merging as it is not related to failing e2e

@ThyMinimalDev ThyMinimalDev merged commit e260809 into main Jun 27, 2024
30 of 35 checks passed
@ThyMinimalDev ThyMinimalDev deleted the feat-api-v2-org-teams-endpoints branch June 27, 2024 16:04
p6l-richard pushed a commit to p6l-richard/cal.com-fork that referenced this pull request Jul 22, 2024
* feat: organizations teams endpoints apiv2

* fixup! Merge branch 'main' into feat-api-v2-org-teams-endpoints

* chore: add roles guard to endpoints

* add tests

* fixup! Merge branch 'main' into feat-api-v2-org-teams-endpoints

* fixup! fixup! Merge branch 'main' into feat-api-v2-org-teams-endpoints

* fixup! fixup! fixup! Merge branch 'main' into feat-api-v2-org-teams-endpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api area: API, enterprise API, access token, OAuth core area: core, team members only ✨ feature New feature or request organizations area: organizations, orgs platform Anything related to our platform plan ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants