fix: allow delegated admin panel access#91
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 411b0ea414
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
I fixed delegated admin access in the admin panel by removing stale local
SystemRoles.ADMINvetoes after the LibreChat backend has already authorized the admin flow.403responses as the source of truth for revoked or missing admin access.403.LibreChat code references:
requireCapability(SystemCapabilities.ACCESS_ADMIN)inapi/server/routes/admin/auth.js.requireAdminAccessmiddleware before returning successful admin responses inapi/server/routes/admin/auth.js.hasCapability(..., SystemCapabilities.ACCESS_ADMIN)before minting a refreshed bearer inapi/server/routes/admin/auth.js.ACCESS_ADMINinpackages/api/src/auth/refresh.ts.Change Type
Testing
bun run test src/server/auth.oauth.test.tseslint src/server/auth.ts src/server/auth.oauth.test.tsprettier --check src/server/auth.ts src/server/auth.oauth.test.tsbun run buildTest Configuration:
Checklist