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

fix: Hide org tab when you are team admin #14627

Conversation

sean-brydon
Copy link
Member

fixes: CAL-3473 CAL-3475

See linear for loom

CleanShot 2024-04-17 at 09 54 49@2x

@graphite-app graphite-app bot requested a review from a team April 17, 2024 09:00
Copy link
Contributor

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

@dosubot dosubot bot added core area: core, team members only teams area: teams, round robin, collective, managed event-types 🐛 bug Something isn't working labels Apr 17, 2024
Copy link

graphite-app bot commented Apr 17, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (04/17/24)

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

Copy link
Contributor

📦 Next.js Bundle Analysis for @calcom/web

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

Four 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)
/availability/troubleshoot 202.06 KB 430.4 KB 122.97% (🔴 +32.96%)
/booking/[uid] 224.65 KB 452.99 KB 129.42% (🟢 -0.31%)
/booking/[uid]/embed 224.65 KB 452.99 KB 129.43% (🟢 -0.32%)
/settings/organizations/platform/oauth-clients/create 261.16 KB 489.5 KB 139.86% (🟢 -0.27%)
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.

Copy link

deploysentinel bot commented Apr 17, 2024

Current Playwright Test Results Summary

✅ 302 Passing - ⚠️ 16 Flaky

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

(Last updated on 04/17/2024 09:19:56am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 5ffc6f8

Started: 04/17/2024 09:14:10am UTC

⚠️ Flakes

📄   apps/web/playwright/booking-pages.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
pro user -- legacy Time slots should be reserved when selected
Retry 1Initial Attempt
0.36% (1) 1 / 274 run
failed over last 7 days
6.93% (19) 19 / 274 runs
flaked over last 7 days

📄   apps/web/playwright/booking-seats.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Reschedule for booking with seats If rescheduled/cancelled booking with seats it should display the correct number of seats
Retry 1Initial Attempt
0.37% (1) 1 / 272 run
failed over last 7 days
4.04% (11) 11 / 272 runs
flaked over last 7 days

📄   apps/web/playwright/integrations-stripe.e2e.ts • 3 Flakes

Top 1 Common Error Messages

null

3 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration Can book a paid booking
Retry 1Initial Attempt
5.05% (14) 14 / 277 runs
failed over last 7 days
39.35% (109) 109 / 277 runs
flaked over last 7 days
Stripe integration Paid booking should be able to be rescheduled
Retry 2Retry 1Initial Attempt
2.26% (6) 6 / 265 runs
failed over last 7 days
6.79% (18) 18 / 265 runs
flaked over last 7 days
Stripe integration Paid booking should be able to be cancelled
Retry 1Initial Attempt
1.13% (3) 3 / 266 runs
failed over last 7 days
6.77% (18) 18 / 266 runs
flaked over last 7 days

📄   apps/web/playwright/apps/analytics/analyticsApps.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Check analytics Apps Check analytics Apps
Retry 1Initial Attempt
1.10% (3) 3 / 273 runs
failed over last 7 days
6.59% (18) 18 / 273 runs
flaked over last 7 days

📄   apps/web/playwright/event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests -- legacy user Different Locations Tests Can add Link Meeting as location and book with it
Retry 1Initial Attempt
0% (0) 0 / 269 runs
failed over last 7 days
1.86% (5) 5 / 269 runs
flaked over last 7 days

📄   apps/web/playwright/webhook.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
FORM_SUBMITTED on submitting team form, triggers team webhook
Retry 1Initial Attempt
1.10% (3) 3 / 272 runs
failed over last 7 days
18.38% (50) 50 / 272 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 8 Flakes

Top 1 Common Error Messages

null

8 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1Initial Attempt
-0.38% (-1) -1 / 266 runs
failed over last 7 days
64.29% (171) 171 / 266 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
-180% (-171) -171 / 95 runs
failed over last 7 days
180% (171) 171 / 95 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
-180% (-171) -171 / 95 runs
failed over last 7 days
180% (171) 171 / 95 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1Initial Attempt
-177.89% (-169) -169 / 95 runs
failed over last 7 days
178.95% (170) 170 / 95 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when configured with 'auto' theme using Embed API
Retry 1Initial Attempt
-180.85% (-170) -170 / 94 runs
failed over last 7 days
180.85% (170) 170 / 94 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Event Booking Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-180.85% (-170) -170 / 94 runs
failed over last 7 days
180.85% (170) 170 / 94 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Booker Profile Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-180.85% (-170) -170 / 94 runs
failed over last 7 days
180.85% (170) 170 / 94 runs
flaked over last 7 days
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1Initial Attempt
-180.85% (-170) -170 / 94 runs
failed over last 7 days
180.85% (170) 170 / 94 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-04-17 at 2 49 53 PM

As a team admin(and member of org) i don't see members of team like org admin

Screenshot 2024-04-17 at 2 49 57 PM

Comment on lines +18 to +22
const isOrgPrivate = ctx.user.organization.isPrivate;
const isOrgAdmin = ctx.user.organization.isOrgAdmin;

if (isOrgPrivate && !isOrgAdmin) return [];

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is returning empty array even when team is not private but org is private. so event team admin cannot view all the team members

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh great shout

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked that this is nothing to do with this PR (still happens on main)

I will merge this and do a follow up for history sake

@sean-brydon sean-brydon merged commit 4aeb6b7 into main Apr 17, 2024
39 checks passed
@sean-brydon sean-brydon deleted the sean/cal-3475-members-can-see-other-invited-team-members-to-a-team branch April 17, 2024 09:38
@keithwillcode
Copy link
Contributor

@sean-brydon @Udit-takkar automated tests need to be added to verify this functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working consumer core area: core, team members only teams area: teams, round robin, collective, managed event-types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants