mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-08 22:21:23 +00:00
Cloud: remove extension_bridge_enabled for personal users (#7638)
This commit is contained in:
parent
8dbd30af6c
commit
f12f1934a7
2 changed files with 9 additions and 18 deletions
|
|
@ -563,11 +563,7 @@ export class WebAuthService extends EventEmitter<AuthServiceEvents> implements A
|
|||
)?.email_address
|
||||
}
|
||||
|
||||
// Check for extension_bridge_enabled in user's public metadata
|
||||
let extensionBridgeEnabled = false
|
||||
if (userData.public_metadata?.extension_bridge_enabled === true) {
|
||||
extensionBridgeEnabled = true
|
||||
}
|
||||
let extensionBridgeEnabled = true
|
||||
|
||||
// Fetch organization info if user is in organization context
|
||||
try {
|
||||
|
|
@ -583,11 +579,7 @@ export class WebAuthService extends EventEmitter<AuthServiceEvents> implements A
|
|||
if (userMembership) {
|
||||
this.setUserOrganizationInfo(userInfo, userMembership)
|
||||
|
||||
// Check organization public metadata for extension_bridge_enabled
|
||||
// Organization setting takes precedence over user setting
|
||||
if (await this.isExtensionBridgeEnabledForOrganization(storedOrgId)) {
|
||||
extensionBridgeEnabled = true
|
||||
}
|
||||
extensionBridgeEnabled = await this.isExtensionBridgeEnabledForOrganization(storedOrgId)
|
||||
|
||||
this.log("[auth] User in organization context:", {
|
||||
id: userMembership.organization.id,
|
||||
|
|
@ -608,10 +600,9 @@ export class WebAuthService extends EventEmitter<AuthServiceEvents> implements A
|
|||
if (primaryOrgMembership) {
|
||||
this.setUserOrganizationInfo(userInfo, primaryOrgMembership)
|
||||
|
||||
// Check organization public metadata for extension_bridge_enabled
|
||||
if (await this.isExtensionBridgeEnabledForOrganization(primaryOrgMembership.organization.id)) {
|
||||
extensionBridgeEnabled = true
|
||||
}
|
||||
extensionBridgeEnabled = await this.isExtensionBridgeEnabledForOrganization(
|
||||
primaryOrgMembership.organization.id,
|
||||
)
|
||||
|
||||
this.log("[auth] Legacy credentials: Found organization membership:", {
|
||||
id: primaryOrgMembership.organization.id,
|
||||
|
|
|
|||
|
|
@ -560,7 +560,7 @@ describe("WebAuthService", () => {
|
|||
name: "John Doe",
|
||||
email: "john@example.com",
|
||||
picture: "https://example.com/avatar.jpg",
|
||||
extensionBridgeEnabled: false,
|
||||
extensionBridgeEnabled: true,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
|
@ -725,7 +725,7 @@ describe("WebAuthService", () => {
|
|||
name: "Jane Smith",
|
||||
email: "jane@example.com",
|
||||
picture: "https://example.com/jane.jpg",
|
||||
extensionBridgeEnabled: false,
|
||||
extensionBridgeEnabled: true,
|
||||
})
|
||||
})
|
||||
|
||||
|
|
@ -844,7 +844,7 @@ describe("WebAuthService", () => {
|
|||
name: "John Doe",
|
||||
email: undefined,
|
||||
picture: undefined,
|
||||
extensionBridgeEnabled: false,
|
||||
extensionBridgeEnabled: true,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
@ -969,7 +969,7 @@ describe("WebAuthService", () => {
|
|||
name: "Test User",
|
||||
email: undefined,
|
||||
picture: undefined,
|
||||
extensionBridgeEnabled: false,
|
||||
extensionBridgeEnabled: true,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue