From e32a4a2779b3eda886bec6a5a64a5217e10c8f57 Mon Sep 17 00:00:00 2001 From: F04C Date: Mon, 2 Mar 2026 13:23:39 +0800 Subject: [PATCH] adjusted the authz --- .continue/agents/new-config.yaml | 23 +++++++++++++++++++++++ repository/permission_repository.go | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .continue/agents/new-config.yaml diff --git a/.continue/agents/new-config.yaml b/.continue/agents/new-config.yaml new file mode 100644 index 0000000..d55cdcf --- /dev/null +++ b/.continue/agents/new-config.yaml @@ -0,0 +1,23 @@ +# This is an example configuration file +# To learn more, see the full config.yaml reference: https://docs.continue.dev/reference + +name: Example Config +version: 1.0.0 +schema: v1 + +# Define which models can be used +# https://docs.continue.dev/customization/models +models: + - name: my gpt-5 + provider: openai + model: gpt-5 + apiKey: YOUR_OPENAI_API_KEY_HERE + - uses: ollama/qwen2.5-coder-7b + - uses: anthropic/claude-4-sonnet + with: + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + +# MCP Servers that Continue can access +# https://docs.continue.dev/customization/mcp-tools +mcpServers: + - uses: anthropic/memory-mcp diff --git a/repository/permission_repository.go b/repository/permission_repository.go index 06c12a3..4794125 100644 --- a/repository/permission_repository.go +++ b/repository/permission_repository.go @@ -17,7 +17,7 @@ func GetPermissionByResourceActionAndRole(resource, action string, roleID int) ( FROM permissions p INNER JOIN role_permissions rp ON p.permissions_id = rp.permission_id - WHERE p.resource = ? AND p.action = ? AND rp.role_id = ? + WHERE p.resource = ? AND p.action = ? AND rp.role_id = ? AND rp.is_deleted = 0 LIMIT 1 `