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: Add Organization Admin scope to API V1 #14860

Merged
merged 65 commits into from
May 21, 2024
Merged

Conversation

alishaz-polymath
Copy link
Member

@alishaz-polymath alishaz-polymath commented May 2, 2024

What does this PR do?

  • Updates the admin guard isAdminisSystemWideAdmin for added clarity by clarifying scope of access to be system wide
  • Updates the admin guard to consider Organization owners or admins with isOrganizationOwnerOrAdmin and the scope of access is the members of the organization
  • Implements isOrganizationOwnerOrAdmin on bookings endpoint as an example:
    • /bookings GET
    • /bookings POST
    • /bookings/[id] PATCH
    • /bookings/[id]/cancel DELETE
    • /bookings/[id] GET

This PR also adds Pagination to the bookings endpoint, accessible by passing take & page parameters, where take represents the number of items in the resulting array and page represents the page number when taking 'take' number of items per page.

For example, if there are 20 results, we can use take=5 and page=3 to get results 11-15.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected)
  • I have added a Docs issue here if this PR makes changes that would require a documentation change
  • I have added or modified automated tests that prove my fix is effective or that my feature works (PRs might be rejected if logical changes are not properly tested)

Copy link
Contributor

github-actions bot commented May 2, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

Copy link

vercel bot commented May 2, 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 May 21, 2024 7:34pm
cal ⬜️ Ignored (Inspect) Visit Preview May 21, 2024 7:34pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview May 21, 2024 7:34pm

@alishaz-polymath alishaz-polymath changed the title feat: Add Organization And Team Admin scope to API V1 feat: Add Organization Admin scope to API V1 May 6, 2024
Copy link

deploysentinel bot commented May 6, 2024

Current Playwright Test Results Summary

✅ 3 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 05/21/2024 08:08:41pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: f0dab0c

Started: 05/21/2024 08:08:06pm UTC

⚠️ Flakes

📄   packages/embeds/embed-react/playwright/tests/basic.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
React Embed Element Click Popup should verify that the iframe got created with correct URL - namespaced
Retry 2Retry 1Initial Attempt
20.66% (56) 56 / 271 runs
failed over last 7 days
34.32% (93) 93 / 271 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Contributor

github-actions bot commented May 6, 2024

📦 Next.js Bundle Analysis for @calcom/web

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

This PR introduced no changes to the JavaScript bundle! 🙌

@CLAassistant
Copy link

CLAassistant commented May 21, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ keithwillcode
✅ joeauyeung
❌ Syed Ali Shahbaz


Syed Ali Shahbaz seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@keithwillcode
Copy link
Contributor

@alishaz-polymath @zomars Peeling out the integration tests skeleton to here so it's separated. We've already verified that all new integration tests added in this PR pass.

@zomars zomars enabled auto-merge (squash) May 21, 2024 19:34
@zomars zomars merged commit bd1664a into main May 21, 2024
40 of 41 checks passed
@zomars zomars deleted the feat/api-v1-team-org-admin branch May 21, 2024 20:09
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 bookings area: bookings, availability, timezones, double booking consumer core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO ✨ feature New feature or request High priority Created by Linear-GitHub Sync high-risk Requires approval by Foundation team organizations area: organizations, orgs platform Anything related to our platform plan zapier Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3677] Add Organization Admin Scope for API V1
8 participants