Skip to content

fix: hide provider and key action buttons based on RBAC permissions - #3296

Merged
akshaydeo merged 2 commits into
devfrom
05-07-fix_rbac_checks_for_model_provider_page
May 8, 2026
Merged

fix: hide provider and key action buttons based on RBAC permissions#3296
akshaydeo merged 2 commits into
devfrom
05-07-fix_rbac_checks_for_model_provider_page

Conversation

@impoiler

@impoiler impoiler commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Improves RBAC enforcement across the configuration and providers UI by hiding action controls entirely when the user lacks the required permissions, rather than rendering them in a disabled state.

Changes

  • The config layout now checks the current route to determine which RBAC resource to evaluate — APIKeys for /workspace/config/api-keys routes and Settings for all others, so users without API key access are not incorrectly blocked from other config pages.
  • The "Add Provider" dropdown is now conditionally rendered only when the user has provider create access, instead of always rendering with a disabled state.
  • The "Add new key" button in the model provider keys table is now hidden entirely when the user lacks update access, rather than being rendered as disabled.
  • The per-row actions dropdown menu (Edit/Delete) in the model provider keys table is now hidden entirely when the user has neither update nor delete access.

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

  1. Log in as a user with restricted RBAC permissions (no APIKeys view access, no provider create/update/delete access).
  2. Navigate to /workspace/config/api-keys — the no-permission view should be shown.
  3. Navigate to another config page — it should load normally.
  4. Navigate to the Providers page — the "Add Provider" dropdown should not be visible.
  5. Open a provider's key table — the "Add new key" button and the per-row actions menu should not be visible.
  6. Log in as a user with full access and verify all controls appear and function as expected.
cd ui
pnpm i || npm i
pnpm build || npm run build

Screenshots/Recordings

If UI changes, add before/after screenshots or short clips.

Breaking changes

  • Yes
  • No

Related issues

Link related issues and discussions.

Security considerations

These changes tighten UI-level RBAC enforcement by ensuring that action controls are not rendered at all for unauthorized users, reducing the surface area for accidental or misleading interactions. Server-side authorization remains the authoritative enforcement layer.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • UI/UX Improvements
    • Configuration data loading is now optimized—loading only what's needed for your current configuration section
    • Provider and configuration management buttons are now intelligently displayed based on access level instead of showing disabled buttons, creating a cleaner interface

Walkthrough

Three workspace UI files now conditionally render elements based on RBAC permissions. The config layout route determines required access level from the current pathname and gates data fetching accordingly. The provider page hides the create dropdown when access is denied. The provider keys table hides add and row action controls when the user lacks corresponding permissions.

Changes

Permission-Based UI Rendering

Layer / File(s) Summary
Config Route RBAC Gating
ui/app/workspace/config/layout.tsx
Route derives pathname, determines if currently under /workspace/config/api-keys, selects requiredAccess accordingly, and gates both useGetCoreConfigQuery execution and NoPermissionView rendering.
Provider Creation and Imports
ui/app/workspace/providers/page.tsx
Imports reordered; AddProviderDropdown now conditionally renders only when hasProviderCreateAccess is true, replacing unconditional render with disabled state.
Provider Keys Table Conditional Actions
ui/app/workspace/providers/views/modelProviderKeysTableView.tsx
"Add new" button renders only when provider is non-keyless and user has update access; row dropdown menu renders only when user has update or delete permissions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Permission checks now gate the view,
No disabled buttons—just what's true.
Hide what users cannot touch,
Cleaner UI, oh so much!
Config, providers, all in sync,
RBAC flows without a blink. 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: hide provider and key action buttons based on RBAC permissions' clearly and specifically summarizes the main changes, accurately reflecting the conditional rendering improvements across configuration and provider UI components.
Description check ✅ Passed The PR description is comprehensive and well-structured, following the template with all major sections completed including summary, detailed changes, type of change, affected areas, testing steps, and security considerations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 05-07-fix_rbac_checks_for_model_provider_page

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@impoiler
impoiler force-pushed the 05-07-fix_rbac_checks_the_sidebar_and_hides_the_resource_if_it_is_not_permitted branch from c442cd8 to ca274f9 Compare May 8, 2026 05:42
@impoiler
impoiler force-pushed the 05-07-fix_rbac_checks_for_model_provider_page branch from cdf8e9c to 4b78c15 Compare May 8, 2026 05:42
@impoiler
impoiler force-pushed the 05-07-fix_rbac_checks_the_sidebar_and_hides_the_resource_if_it_is_not_permitted branch from ca274f9 to 2d17490 Compare May 8, 2026 05:54
@impoiler
impoiler force-pushed the 05-07-fix_rbac_checks_for_model_provider_page branch from 4b78c15 to d690f0d Compare May 8, 2026 05:54
@impoiler
impoiler force-pushed the 05-07-fix_rbac_checks_for_model_provider_page branch from d690f0d to 9585ac6 Compare May 8, 2026 06:52
@impoiler
impoiler force-pushed the 05-07-fix_rbac_checks_the_sidebar_and_hides_the_resource_if_it_is_not_permitted branch from 2d17490 to 641ad72 Compare May 8, 2026 06:52
@impoiler impoiler changed the title fix: RBAc checks for model provider page fix: hide provider and key action buttons based on RBAC permissions May 8, 2026
@impoiler impoiler self-assigned this May 8, 2026
@impoiler
impoiler marked this pull request as ready for review May 8, 2026 10:46
@greptile-apps

greptile-apps Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5

Safe to merge — the changes only affect UI rendering logic and introduce no new data mutations or server-side access paths.

The RBAC guard in the config layout correctly routes to different permission checks based on pathname, and the conditional rendering in the providers views is straightforward. The only issues are cosmetic: two disabled props that are now always false were left in after their enclosing conditions made them unreachable.

No files require special attention; the redundant disabled props in providers/page.tsx and modelProviderKeysTableView.tsx are worth cleaning up but have no runtime impact.

Important Files Changed

Filename Overview
ui/app/workspace/config/layout.tsx Adds route-aware RBAC check: uses APIKeys permission for api-keys routes and Settings permission for all other config sub-routes. The NoPermissionView always shows a generic "configuration" label regardless of which permission is missing.
ui/app/workspace/providers/page.tsx Conditionally renders AddProviderDropdown only when hasProviderCreateAccess is true; the disabled prop passed to it is now always false and can be removed.
ui/app/workspace/providers/views/modelProviderKeysTableView.tsx Hides Add-key button and per-row actions dropdown when user lacks the required permissions; the disabled prop on the Button is now redundant since it only renders when hasUpdateProviderAccess is true.

Reviews (1): Last reviewed commit: "fix: RBAc checks for model provider page" | Re-trigger Greptile

Comment thread ui/app/workspace/providers/views/modelProviderKeysTableView.tsx
Comment thread ui/app/workspace/config/layout.tsx
Comment thread ui/app/workspace/providers/page.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
ui/app/workspace/providers/views/modelProviderKeysTableView.tsx (2)

155-155: 💤 Low value

Clarify or remove the empty onClick handler.

The table row has an empty onClick handler (onClick={() => { }}). If this is intentional to prevent event bubbling or for future use, consider adding a comment. Otherwise, remove it for clarity.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ui/app/workspace/providers/views/modelProviderKeysTableView.tsx` at line 155,
The table row contains an empty onClick handler (onClick={() => { }}) which is
ambiguous; either remove the handler entirely from the row element to avoid
needless no-op code, or replace it with a brief explanatory comment and a named
no-op function (e.g., rowClickPlaceholder) if it intentionally prevents event
bubbling or is reserved for future behavior; locate the row element in
modelProviderKeysTableView's render/JSX (the row with onClick={() => { }}) and
apply one of these changes so the intent is explicit.

109-120: ⚡ Quick win

Remove redundant disabled prop.

The "Add new key" button now renders only when hasUpdateProviderAccess is true, so the disabled={!hasUpdateProviderAccess} prop on line 111 will always evaluate to disabled={false} and can be removed.

♻️ Simplified code
 {!isKeyless && hasUpdateProviderAccess ? (
   <Button
-    disabled={!hasUpdateProviderAccess}
     data-testid="add-key-btn"
     onClick={() => {
       handleAddKey();
     }}
   >
     <PlusIcon className="h-4 w-4" />
     Add new {entityLabel}
   </Button>
 ) : null}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ui/app/workspace/providers/views/modelProviderKeysTableView.tsx` around lines
109 - 120, The Button rendering includes a redundant disabled prop because the
conditional already ensures it only renders when hasUpdateProviderAccess is
true; remove the disabled={!hasUpdateProviderAccess} prop from the Button
component in modelProviderKeysTableView.tsx (the JSX block that references
isKeyless, hasUpdateProviderAccess, Button, handleAddKey, and entityLabel) so
the Button is rendered without the unnecessary disabled attribute.
ui/app/workspace/providers/page.tsx (1)

243-251: ⚡ Quick win

Remove redundant disabled prop.

Since AddProviderDropdown now renders only when hasProviderCreateAccess is true, the disabled={!hasProviderCreateAccess} prop on line 245 will always evaluate to disabled={false} and can be removed. The same applies to line 143 in the empty state.

♻️ Simplified code
 {hasProviderCreateAccess ? <div className="pb-4">
   <AddProviderDropdown
-    disabled={!hasProviderCreateAccess}
     existingInSidebar={existingInSidebarNames}
     knownProviders={knownProviders}
     onSelectKnownProvider={handleSelectKnownProvider}
     onAddCustomProvider={() => setShowCustomProviderSheet(true)}
   />
 </div> : null}

And similarly at line 142–149:

 <AddProviderDropdown
-  disabled={!hasProviderCreateAccess}
   existingInSidebar={existingInSidebarNames}
   knownProviders={knownProviders}
   onSelectKnownProvider={handleSelectKnownProvider}
   onAddCustomProvider={() => setShowCustomProviderSheet(true)}
   variant="empty"
 />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ui/app/workspace/providers/page.tsx` around lines 243 - 251, The
AddProviderDropdown is only rendered when hasProviderCreateAccess is true, so
remove the redundant disabled={!hasProviderCreateAccess} prop from the
AddProviderDropdown instances (the one in the provider list block and the one in
the empty state block); keep all other props (existingInSidebarNames,
knownProviders, onSelectKnownProvider, onAddCustomProvider which calls
setShowCustomProviderSheet) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@ui/app/workspace/providers/page.tsx`:
- Around line 243-251: The AddProviderDropdown is only rendered when
hasProviderCreateAccess is true, so remove the redundant
disabled={!hasProviderCreateAccess} prop from the AddProviderDropdown instances
(the one in the provider list block and the one in the empty state block); keep
all other props (existingInSidebarNames, knownProviders, onSelectKnownProvider,
onAddCustomProvider which calls setShowCustomProviderSheet) unchanged.

In `@ui/app/workspace/providers/views/modelProviderKeysTableView.tsx`:
- Line 155: The table row contains an empty onClick handler (onClick={() => {
}}) which is ambiguous; either remove the handler entirely from the row element
to avoid needless no-op code, or replace it with a brief explanatory comment and
a named no-op function (e.g., rowClickPlaceholder) if it intentionally prevents
event bubbling or is reserved for future behavior; locate the row element in
modelProviderKeysTableView's render/JSX (the row with onClick={() => { }}) and
apply one of these changes so the intent is explicit.
- Around line 109-120: The Button rendering includes a redundant disabled prop
because the conditional already ensures it only renders when
hasUpdateProviderAccess is true; remove the disabled={!hasUpdateProviderAccess}
prop from the Button component in modelProviderKeysTableView.tsx (the JSX block
that references isKeyless, hasUpdateProviderAccess, Button, handleAddKey, and
entityLabel) so the Button is rendered without the unnecessary disabled
attribute.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 164b6794-ba9f-46ee-bbc2-eada2820d66d

📥 Commits

Reviewing files that changed from the base of the PR and between 641ad72 and 9585ac6.

📒 Files selected for processing (3)
  • ui/app/workspace/config/layout.tsx
  • ui/app/workspace/providers/page.tsx
  • ui/app/workspace/providers/views/modelProviderKeysTableView.tsx

akshaydeo commented May 8, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • May 8, 11:29 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 8, 11:30 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo changed the base branch from 05-07-fix_rbac_checks_the_sidebar_and_hides_the_resource_if_it_is_not_permitted to graphite-base/3296 May 8, 2026 11:29
@akshaydeo
akshaydeo changed the base branch from graphite-base/3296 to dev May 8, 2026 11:30
@akshaydeo
akshaydeo merged commit 3f1ec4a into dev May 8, 2026
12 of 13 checks passed
@akshaydeo
akshaydeo deleted the 05-07-fix_rbac_checks_for_model_provider_page branch May 8, 2026 11:30
impoiler added a commit that referenced this pull request May 11, 2026
…3296)

## Summary

Improves RBAC enforcement across the configuration and providers UI by hiding action controls entirely when the user lacks the required permissions, rather than rendering them in a disabled state.

## Changes

- The config layout now checks the current route to determine which RBAC resource to evaluate — `APIKeys` for `/workspace/config/api-keys` routes and `Settings` for all others, so users without API key access are not incorrectly blocked from other config pages.
- The "Add Provider" dropdown is now conditionally rendered only when the user has provider create access, instead of always rendering with a disabled state.
- The "Add new key" button in the model provider keys table is now hidden entirely when the user lacks update access, rather than being rendered as disabled.
- The per-row actions dropdown menu (Edit/Delete) in the model provider keys table is now hidden entirely when the user has neither update nor delete access.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Log in as a user with restricted RBAC permissions (no `APIKeys` view access, no provider create/update/delete access).
2. Navigate to `/workspace/config/api-keys` — the no-permission view should be shown.
3. Navigate to another config page — it should load normally.
4. Navigate to the Providers page — the "Add Provider" dropdown should not be visible.
5. Open a provider's key table — the "Add new key" button and the per-row actions menu should not be visible.
6. Log in as a user with full access and verify all controls appear and function as expected.

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Screenshots/Recordings

If UI changes, add before/after screenshots or short clips.

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

Link related issues and discussions.

## Security considerations

These changes tighten UI-level RBAC enforcement by ensuring that action controls are not rendered at all for unauthorized users, reducing the surface area for accidental or misleading interactions. Server-side authorization remains the authoritative enforcement layer.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable
akshaydeo pushed a commit that referenced this pull request May 12, 2026
…3296)

## Summary

Improves RBAC enforcement across the configuration and providers UI by hiding action controls entirely when the user lacks the required permissions, rather than rendering them in a disabled state.

## Changes

- The config layout now checks the current route to determine which RBAC resource to evaluate — `APIKeys` for `/workspace/config/api-keys` routes and `Settings` for all others, so users without API key access are not incorrectly blocked from other config pages.
- The "Add Provider" dropdown is now conditionally rendered only when the user has provider create access, instead of always rendering with a disabled state.
- The "Add new key" button in the model provider keys table is now hidden entirely when the user lacks update access, rather than being rendered as disabled.
- The per-row actions dropdown menu (Edit/Delete) in the model provider keys table is now hidden entirely when the user has neither update nor delete access.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Log in as a user with restricted RBAC permissions (no `APIKeys` view access, no provider create/update/delete access).
2. Navigate to `/workspace/config/api-keys` — the no-permission view should be shown.
3. Navigate to another config page — it should load normally.
4. Navigate to the Providers page — the "Add Provider" dropdown should not be visible.
5. Open a provider's key table — the "Add new key" button and the per-row actions menu should not be visible.
6. Log in as a user with full access and verify all controls appear and function as expected.

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Screenshots/Recordings

If UI changes, add before/after screenshots or short clips.

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

Link related issues and discussions.

## Security considerations

These changes tighten UI-level RBAC enforcement by ensuring that action controls are not rendered at all for unauthorized users, reducing the surface area for accidental or misleading interactions. Server-side authorization remains the authoritative enforcement layer.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable
akshaydeo pushed a commit that referenced this pull request May 12, 2026
…3296)

## Summary

Improves RBAC enforcement across the configuration and providers UI by hiding action controls entirely when the user lacks the required permissions, rather than rendering them in a disabled state.

## Changes

- The config layout now checks the current route to determine which RBAC resource to evaluate — `APIKeys` for `/workspace/config/api-keys` routes and `Settings` for all others, so users without API key access are not incorrectly blocked from other config pages.
- The "Add Provider" dropdown is now conditionally rendered only when the user has provider create access, instead of always rendering with a disabled state.
- The "Add new key" button in the model provider keys table is now hidden entirely when the user lacks update access, rather than being rendered as disabled.
- The per-row actions dropdown menu (Edit/Delete) in the model provider keys table is now hidden entirely when the user has neither update nor delete access.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Log in as a user with restricted RBAC permissions (no `APIKeys` view access, no provider create/update/delete access).
2. Navigate to `/workspace/config/api-keys` — the no-permission view should be shown.
3. Navigate to another config page — it should load normally.
4. Navigate to the Providers page — the "Add Provider" dropdown should not be visible.
5. Open a provider's key table — the "Add new key" button and the per-row actions menu should not be visible.
6. Log in as a user with full access and verify all controls appear and function as expected.

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Screenshots/Recordings

If UI changes, add before/after screenshots or short clips.

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

Link related issues and discussions.

## Security considerations

These changes tighten UI-level RBAC enforcement by ensuring that action controls are not rendered at all for unauthorized users, reducing the surface area for accidental or misleading interactions. Server-side authorization remains the authoritative enforcement layer.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable
akshaydeo added a commit that referenced this pull request May 12, 2026
…hropic (#3420)

* feat: add granular RBAC checks for API keys, inference, metrics, and filter inaccessible sidebar items (#3295)

## Summary

This PR improves RBAC granularity in the sidebar by introducing dedicated resource types for `APIKeys`, `Inference`, and `Metrics`, and fixes sidebar visibility logic so that items and groups are hidden when the user lacks access rather than relying on broader, less specific permissions.

## Changes

- Added three new `RbacResource` enum values: `APIKeys`, `Inference`, and `Metrics` to the fallback RBAC context.
- The API Keys sidebar item now gates access via the new `hasAPIKeyAccess` (`RbacResource.APIKeys`) check instead of the generic `hasSettingsAccess`.
- The MCP Logs sidebar item now correctly gates access via `hasMCPGatewayAccess` instead of the unrelated `hasLogsAccess`.
- Introduced an `accessibleItems` memoized computation that filters out sidebar items and entire groups whose sub-items are all inaccessible, ensuring users never see empty navigation sections. Previously, access filtering only happened during search.
- Removed unused imports (`PanelLeft`, `PanelRight`, `cn`).

## Type of change

- [ ] Bug fix
- [x] Feature
- [x] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Log in as a user with restricted RBAC permissions that exclude `APIKeys` and/or `Settings`.
2. Verify the API Keys entry under the Config section is hidden for users without `APIKeys` view permission.
3. Verify the MCP Logs entry is hidden for users without `MCPGateway` view permission.
4. Verify that sidebar groups with no accessible sub-items are hidden entirely rather than showing an empty group.
5. Verify that users with full access see no change in sidebar behavior.

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Screenshots/Recordings

_Add before/after screenshots showing sidebar items hidden for restricted users._

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

_Link related issues here._

## Security considerations

Access control checks for API Keys management are now scoped to a dedicated `APIKeys` RBAC resource rather than the broader `Settings` resource, reducing the risk of unintended access to key management for users who have settings visibility but should not manage API keys.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

* fix: hide provider and key action buttons based on RBAC permissions (#3296)

## Summary

Improves RBAC enforcement across the configuration and providers UI by hiding action controls entirely when the user lacks the required permissions, rather than rendering them in a disabled state.

## Changes

- The config layout now checks the current route to determine which RBAC resource to evaluate — `APIKeys` for `/workspace/config/api-keys` routes and `Settings` for all others, so users without API key access are not incorrectly blocked from other config pages.
- The "Add Provider" dropdown is now conditionally rendered only when the user has provider create access, instead of always rendering with a disabled state.
- The "Add new key" button in the model provider keys table is now hidden entirely when the user lacks update access, rather than being rendered as disabled.
- The per-row actions dropdown menu (Edit/Delete) in the model provider keys table is now hidden entirely when the user has neither update nor delete access.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Log in as a user with restricted RBAC permissions (no `APIKeys` view access, no provider create/update/delete access).
2. Navigate to `/workspace/config/api-keys` — the no-permission view should be shown.
3. Navigate to another config page — it should load normally.
4. Navigate to the Providers page — the "Add Provider" dropdown should not be visible.
5. Open a provider's key table — the "Add new key" button and the per-row actions menu should not be visible.
6. Log in as a user with full access and verify all controls appear and function as expected.

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Screenshots/Recordings

If UI changes, add before/after screenshots or short clips.

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

Link related issues and discussions.

## Security considerations

These changes tighten UI-level RBAC enforcement by ensuring that action controls are not rendered at all for unauthorized users, reducing the surface area for accidental or misleading interactions. Server-side authorization remains the authoritative enforcement layer.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

* fix: hide delete log button instead of disabling it when user lacks delete access (#3314)

## Summary

The delete button in log tables was always rendered (just disabled) for users without delete access. This PR hides the actions column entirely when the user lacks delete permissions, and fixes the RBAC resource check for MCP logs to use the correct `MCPGateway` resource instead of `Logs`.

## Changes

- The actions column in both the workspace logs and MCP logs tables is now conditionally included in the column definitions only when `hasDeleteAccess` is `true`, rather than always rendering a disabled button.
- The delete button styling was updated to use more visible destructive colors (`text-destructive/60 border-destructive/60`) instead of the previous muted secondary foreground styles.
- The RBAC resource used to gate delete access on the MCP logs page was corrected from `RbacResource.Logs` to `RbacResource.MCPGateway`.

## Type of change

- [x] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Log in as a user **without** delete access on Logs or MCPGateway resources.
2. Navigate to the workspace logs page and the MCP logs page.
3. Verify the delete button/column is not visible.
4. Log in as a user **with** delete access.
5. Verify the delete button appears and is functional.

```sh
cd ui
pnpm i
pnpm test
pnpm build
```

## Screenshots/Recordings

Before: Delete button rendered but disabled for users without access.  
After: Delete column is hidden entirely for users without delete access.

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

The RBAC fix ensures MCP log deletion is gated on the correct `MCPGateway` resource permission, preventing users with only `Logs` delete access from incorrectly being granted delete access to MCP logs.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

* feat: add `MCPLogs` RBAC resource and enforce access control on MCP logs route and sidebar (#3316)

## Summary

Introduces a dedicated `MCPLogs` RBAC resource, decoupling MCP log access control from the `MCPGateway` resource. This allows permissions for viewing and deleting MCP logs to be managed independently from gateway-level permissions.

## Changes

- Added `MCPLogs` as a new `RbacResource` enum value in the fallback RBAC context.
- The MCP Logs route now checks `MCPLogs` view permission and renders a `NoPermissionView` when access is denied, rather than rendering the page unconditionally.
- Delete access on the MCP Logs page now checks `RbacResource.MCPLogs` instead of `RbacResource.MCPGateway`.
- The sidebar MCP Logs entry now uses `hasMCPLogsAccess` (derived from `RbacResource.MCPLogs`) to control visibility, rather than reusing `hasMCPGatewayAccess`.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Configure a role that has `MCPGateway` access but **no** `MCPLogs` access.
2. Log in as a user with that role and navigate to the MCP Logs page — the `NoPermissionView` should be displayed and the sidebar entry should be hidden.
3. Grant the role `MCPLogs` view access and confirm the page and sidebar entry become accessible.
4. Verify that delete functionality on the MCP Logs page is gated by `MCPLogs` delete permission independently of `MCPGateway` delete permission.

```sh
cd ui
pnpm i || npm i
pnpm test || npm test
pnpm build || npm run build
```

## Screenshots/Recordings

N/A

## Breaking changes

- [x] Yes
- [ ] No

Any role configuration that previously relied on `MCPGateway` permissions to grant access to MCP Logs will need to be updated to explicitly grant `MCPLogs` permissions.

## Related issues

N/A

## Security considerations

Access to MCP log data (which may contain sensitive tool execution details) is now enforced by a dedicated RBAC resource, reducing the risk of unintended access through overly broad `MCPGateway` permissions.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

* feat: add `MCPToolGroups` RBAC resource and separate access control from `MCPGateway` (#3319)

## Summary

Introduces a dedicated `MCPToolGroups` RBAC resource to allow fine-grained access control over the MCP Tool Groups section, independent of the broader `MCPGateway` resource.

## Changes

- Added `MCPToolGroups` as a new `RbacResource` enum value in the fallback RBAC context.
- Updated the MCP Tool Groups route layout to check `MCPToolGroups` view permission instead of `MCPGateway`.
- Updated the sidebar so the "Tool Groups" sub-item uses `hasMCPToolGroupsAccess`, while the parent MCP nav item remains visible if the user has access to either `MCPGateway` or `MCPToolGroups`.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Configure a role that has access to `MCPGateway` but not `MCPToolGroups`. Verify the "Tool Groups" sidebar item is hidden and navigating to `/workspace/mcp-tool-groups` shows the no-permission view.
2. Configure a role with access to `MCPToolGroups` but not `MCPGateway`. Verify the "Tool Groups" sidebar item is visible and accessible, while other MCP Gateway sections remain restricted.
3. Configure a role with access to both. Verify all MCP sub-items are visible and accessible.

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

Access to the MCP Tool Groups page is now governed by its own RBAC resource (`MCPToolGroups`), allowing enterprise deployments to restrict tool group management independently from MCP Gateway configuration.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

* fix: remove 100-item upper limit on paginated teams query (#3323)

## Summary

Removes the upper bound limit cap of 100 on paginated team queries, allowing callers to request more than 100 teams per page.

## Changes

- Removed the `limit > 100` guard in `GetTeamsPaginated` that was silently capping the page size to 100. This allows consumers to specify larger page sizes when needed.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [x] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

```sh
go test ./...
```

Verify that a call to `GetTeamsPaginated` with a `limit` greater than 100 returns the expected number of results rather than being silently truncated to 100.

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

Removing the page size cap could allow large queries that put additional load on the database. Callers should ensure reasonable limits are enforced at the API layer if unbounded queries are a concern.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

* feat: extend mcp plugin interface for list tools, ping and connections (#3389)

## Summary

Briefly explain the purpose of this PR and the problem it solves.

## Changes

- What was changed and why
- Any notable design decisions or trade-offs

## Type of change

- [ ] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

Describe the steps to validate this change. Include commands and expected outcomes.

```sh
# Core/Transports
go version
go test ./...

# UI
cd ui
pnpm i || npm i
pnpm test || npm test
pnpm build || npm run build
```

If adding new configs or environment variables, document them here.

## Screenshots/Recordings

If UI changes, add before/after screenshots or short clips.

## Breaking changes

- [ ] Yes
- [ ] No

If yes, describe impact and migration instructions.

## Related issues

Link related issues and discussions. Example: Closes #123

## Security considerations

Note any security implications (auth, secrets, PII, sandboxing, etc.).

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

* package bumps (#3422)

## Summary

Bumps several Go dependencies to their latest patch versions across all modules in the repository.

## Changes

- `github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream` upgraded from `v1.7.8` → `v1.7.10`
- `github.com/aws/smithy-go` upgraded from `v1.24.2` → `v1.25.1`
- `github.com/jackc/pgx/v5` upgraded from `v5.9.1` → `v5.9.2`

## Type of change

- [ ] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [x] Chore/CI

## Affected areas

- [x] Core (Go)
- [x] Transports (HTTP)
- [ ] Providers/Integrations
- [x] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

```sh
go test ./...
```

## Breaking changes

- [ ] Yes
- [x] No

## Security considerations

No security implications. These are routine patch-level dependency upgrades with no API surface changes.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [x] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

* fix: fixes model passthrough prefix stripping in advisor tool for anthropic

---------

Co-authored-by: Suresh Chaudhary <83772622+impoiler@users.noreply.github.com>
Co-authored-by: Pratham Mishra <99235987+Pratham-Mishra04@users.noreply.github.com>
Co-authored-by: Akshay Deo <akshay@akshaydeo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants