|
@@ -1553,7 +1553,8 @@ export class ClineProvider
|
|
|
this.postMessageToWebview({ type: "state", state })
|
|
this.postMessageToWebview({ type: "state", state })
|
|
|
|
|
|
|
|
// Check MDM compliance and send user to account tab if not compliant
|
|
// Check MDM compliance and send user to account tab if not compliant
|
|
|
- if (!this.checkMdmCompliance()) {
|
|
|
|
|
|
|
+ // Only redirect if there's an actual MDM policy requiring authentication
|
|
|
|
|
+ if (this.mdmService?.requiresCloudAuth() && !this.checkMdmCompliance()) {
|
|
|
await this.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
|
|
await this.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1872,7 +1873,9 @@ export class ClineProvider
|
|
|
codebaseIndexSearchMaxResults: codebaseIndexConfig?.codebaseIndexSearchMaxResults,
|
|
codebaseIndexSearchMaxResults: codebaseIndexConfig?.codebaseIndexSearchMaxResults,
|
|
|
codebaseIndexSearchMinScore: codebaseIndexConfig?.codebaseIndexSearchMinScore,
|
|
codebaseIndexSearchMinScore: codebaseIndexConfig?.codebaseIndexSearchMinScore,
|
|
|
},
|
|
},
|
|
|
- mdmCompliant: this.checkMdmCompliance(),
|
|
|
|
|
|
|
+ // Only set mdmCompliant if there's an actual MDM policy
|
|
|
|
|
+ // undefined means no MDM policy, true means compliant, false means non-compliant
|
|
|
|
|
+ mdmCompliant: this.mdmService?.requiresCloudAuth() ? this.checkMdmCompliance() : undefined,
|
|
|
profileThresholds: profileThresholds ?? {},
|
|
profileThresholds: profileThresholds ?? {},
|
|
|
cloudApiUrl: getRooCodeApiUrl(),
|
|
cloudApiUrl: getRooCodeApiUrl(),
|
|
|
hasOpenedModeSelector: this.getGlobalState("hasOpenedModeSelector") ?? false,
|
|
hasOpenedModeSelector: this.getGlobalState("hasOpenedModeSelector") ?? false,
|
|
@@ -2172,7 +2175,7 @@ export class ClineProvider
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Check if the current state is compliant with MDM policy
|
|
* Check if the current state is compliant with MDM policy
|
|
|
- * @returns true if compliant, false if blocked
|
|
|
|
|
|
|
+ * @returns true if compliant or no MDM policy exists, false if MDM policy exists and user is non-compliant
|
|
|
*/
|
|
*/
|
|
|
public checkMdmCompliance(): boolean {
|
|
public checkMdmCompliance(): boolean {
|
|
|
if (!this.mdmService) {
|
|
if (!this.mdmService) {
|