feat(access-control): add ALLOWED_INTEGRATIONS env var for self-hosted block restrictions#3238
feat(access-control): add ALLOWED_INTEGRATIONS env var for self-hosted block restrictions#3238waleedlatif1 merged 12 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds an
Confidence Score: 4/5
Important Files Changed
Flowchartflowchart TD
A["ALLOWED_INTEGRATIONS env var"] --> B["getAllowedIntegrationsFromEnv()"]
B -->|"parse, lowercase, split"| C["string[] | null"]
subgraph Server-Side
C --> D["mergeEnvAllowlist()"]
E["Permission Group Config"] --> D
D -->|"intersect or fallback"| F["Merged PermissionGroupConfig"]
F --> G["validateBlockType()"]
F --> H["Copilot Server Tools"]
F --> I["process-contents.ts"]
end
subgraph Client-Side
C --> J["/api/settings/allowed-integrations"]
J --> K["useAllowedIntegrationsFromEnv()"]
K --> L["intersectAllowlists()"]
M["useUserPermissionConfig()"] --> L
L --> N["mergedAllowedIntegrations"]
N --> O["Sidebar / Toolbar / Cmd-K"]
N --> P["Copilot Mentions"]
N --> Q["Integrations Settings"]
end
Last reviewed commit: 4eaad05 |
|
@greptile |
|
@cursor review |
|
@cursor review |
|
@greptile |
|
@cursor review |
2c58c8a to
8dab150
Compare
|
@greptile |
|
@cursor review |
…d block restrictions
…e race, use accurate error message
…o match models endpoint pattern
…revent bypass via direct access
0fff846 to
5ec4e63
Compare
|
@greptile |
|
@cursor review |
Additional Comments (2)
When The
When Since |
|
@greptile |
|
@cursor review |
Summary
ALLOWED_INTEGRATIONSserver env var to restrict available blocks/integrations via allowlist/api/settings/allowed-integrationsand merges with permission group configvalidateBlockTypeblocks disallowed integrations at execution timeType of Change
Testing
Tested manually
Checklist