-
Notifications
You must be signed in to change notification settings - Fork 69
feat: org-level tool permissions with admin UI #375
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
Merged
Merged
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3524e7c
feat: add centralized tool permissions for background action gate bypass
damianloch ee48302
feat: add Tool Permissions UI card to SecuritySettings
damianloch 1f14e0c
fix: add missing seed proxy route and empty state fallback
damianloch 90d59f4
edit ui
damianloch d5211c4
add missing gatings
damianloch ef26b35
fix: docker.sock mount, spinnaker bypass, wildcard permissions, UI po…
damianloch df0c48f
fix: resolve SonarQube code smells
damianloch ec39a03
feat: apply tool permissions to all background chats
damianloch b5a9c80
fix: restore celery_beat common-env and FRONTEND_URL
damianloch 7f2037f
revert: remove docker.sock mounts from PR
damianloch f8b0951
fix: address CodeRabbit review findings
damianloch 92ff8ba
fix: address SonarQube issues
damianloch 91d51f6
fix: address remaining CodeRabbit findings on tool_permissions
damianloch 5b964ac
bypass normal chats too
damianloch f717f5e
uodate UI
damianloch 1a053ed
fix: apply tool permissions to all chats, not just background
damianloch ad2a769
fix: address PR review feedback from beng360
damianloch 653e155
fix: replace empty except blocks with debug logging
damianloch f22a2be
fix: version-based cache invalidation, fail closed, update UI copy
damianloch 894a12f
feat: group tool permissions by risk level in UI
damianloch 5178438
feat: add tier-level toggles to bulk-enable/disable risk groups
damianloch b440ec4
edit grouping of permissions
damianloch f19aeae
refactor: explicit GitHub tiers, kill wildcard, address CR feedback
damianloch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
client/src/app/api/org/tool-permissions/[toolKey]/route.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { NextRequest } from "next/server"; | ||
| import { forwardRequest } from "@/lib/backend-proxy"; | ||
|
|
||
| export async function PUT( | ||
| request: NextRequest, | ||
| { params }: { params: Promise<{ toolKey: string }> }, | ||
| ) { | ||
| const { toolKey } = await params; | ||
| return forwardRequest(request, "PUT", `/api/org/tool-permissions/${toolKey}`, "tool-permissions-toggle"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { NextRequest } from "next/server"; | ||
| import { forwardRequest } from "@/lib/backend-proxy"; | ||
|
|
||
| export async function GET(request: NextRequest) { | ||
| return forwardRequest(request, "GET", "/api/org/tool-permissions", "tool-permissions"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { NextRequest } from "next/server"; | ||
| import { forwardRequest } from "@/lib/backend-proxy"; | ||
|
|
||
| export async function POST(request: NextRequest) { | ||
| return forwardRequest(request, "POST", "/api/org/tool-permissions/seed", "tool-permissions-seed"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { apiGet, apiPut, apiPost } from "./api-client"; | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
|
|
||
| export interface ToolPermission { | ||
| tool_key: string; | ||
| connector: string; | ||
| label: string; | ||
| risk: string; | ||
| enabled: boolean; | ||
| } | ||
|
|
||
| export interface ToolPermissionsResponse { | ||
| tools_by_connector: Record<string, ToolPermission[]>; | ||
| seeded: boolean; | ||
| } | ||
|
|
||
| export const toolPermissionService = { | ||
| getPermissions: () => apiGet<ToolPermissionsResponse>("/api/org/tool-permissions"), | ||
| toggleTool: (toolKey: string, enabled: boolean) => | ||
| apiPut<{ tool_key: string; enabled: boolean }>(`/api/org/tool-permissions/${toolKey}`, { enabled }), | ||
| seedDefaults: () => apiPost<{ seeded: number }>("/api/org/tool-permissions/seed"), | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.