-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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: Allow hideBranding via public API #11978
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes! |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 162 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 10/19/2023 04:27:31am UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: e71ffce Started: 10/19/2023 04:24:45am UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
user can login & logout succesfully login flow user & logout using dashboard
Retry 1 • Initial Attempt |
0% (0)0 / 269 runsfailed over last 7 days |
1.12% (3)3 / 269 runsflaked over last 7 days |
📄 apps/web/playwright/profile.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Teams Profile page is loaded for users in Organization
Retry 1 • Initial Attempt |
0.74% (2)2 / 270 runsfailed over last 7 days |
29.26% (79)79 / 270 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Popup Tests should be able to reschedule
Retry 2 • Retry 1 • Initial Attempt |
8.19% (23)23 / 281 runsfailed over last 7 days |
90.04% (253)253 / 281 runsflaked over last 7 days |
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1 • Initial Attempt |
3.55% (10)10 / 282 runsfailed over last 7 days |
35.82% (101)101 / 282 runsflaked over last 7 days |
// disable role or branding changes unless admin. | ||
if (!isAdmin) { | ||
if (body.role) body.role = undefined; | ||
if (body.hideBranding) body.hideBranding = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I incorrect in thinking this is going to actually override the hideBranding value that's already stored in the database instead of just ignoring what's on the body since we just use the full body object on line 199?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would ignore "hideBranding" as the only acceptable values for hideBranding are boolean, and undefined is pretty much as if it hasn't been passed (since this is optional) in validation schema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Let's make sure to follow up with a PR with automated tests verifying this functionality.
What does this PR do?
Allows toggling
hideBranding
on or off for a user via public API calls (made by instance Admins, of course).Requirement/Documentation
Type of change
How should this be tested?
POST
or /users/[id]PATCH
requests made by Admin.PATCH
request by a non-Admin userMandatory Tasks
Checklist