-
Notifications
You must be signed in to change notification settings - Fork 549
chore: pass allowImpersonation flag to /v2/keys/use #7303
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
chore: pass allowImpersonation flag to /v2/keys/use #7303
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: f866874 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Caution Review failedThe pull request is closed. WalkthroughThe changes extend the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant fetchTeamAndProject
participant API
Caller->>fetchTeamAndProject: Call with authData, config (may include allowImpersonation)
fetchTeamAndProject->>fetchTeamAndProject: Extract allowImpersonation from config
alt allowImpersonation is true
fetchTeamAndProject->>API: GET /team-and-project?allowImpersonation=true
else allowImpersonation is false or undefined
fetchTeamAndProject->>API: GET /team-and-project
end
API-->>fetchTeamAndProject: Respond with TeamAndProjectResponse (may include impersonatedBy)
fetchTeamAndProject-->>Caller: Return ApiResponse
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7303 +/- ##
=======================================
Coverage 55.57% 55.57%
=======================================
Files 909 909
Lines 58673 58673
Branches 4158 4158
=======================================
Hits 32607 32607
Misses 25959 25959
Partials 107 107
🚀 New features to boost your workflow:
|
size-limit report 📦
|
9decd2d
to
11fe40d
Compare
[SDK] Feature: Add support for staff impersonation in API requests
Notes for the reviewer
This PR adds support for staff impersonation in API requests by:
allowImpersonation
flag toCoreServiceConfig
to enable staff members to read data for troubleshootingTeamAndProjectResponse
type to include impersonation detailsfetchTeamAndProject
function to pass the impersonation flag in URL parametersHow to test
Verify that when
allowImpersonation
is set to true, the parameter is correctly passed to the API request.Summary by CodeRabbit
PR-Codex overview
This PR introduces a new feature that allows staff members to impersonate users for troubleshooting purposes by adding an
allowImpersonation
option to the authentication server. It updates the API response to include impersonation details.Detailed summary
allowImpersonation
option inCoreServiceConfig
.TeamAndProjectResponse
to includeimpersonatedBy
object.fetchTeamAndProject
function to handleallowImpersonation
and set it in the URL query parameters.