Skip to content

Commit bdc64b4

Browse files
committed
disable all AI integration on frontend if configured
1 parent bd5e19b commit bdc64b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/packages/frontend/projects/store.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,10 @@ export class ProjectsStore extends Store<ProjectsState> {
811811
tag?: string,
812812
vendor: LLMServiceName | "any" = "any",
813813
): boolean {
814+
if (redux.getStore("account").getIn(["customize", "disableAI"])) {
815+
// admin account-wide AI is disabled for this user.
816+
return false;
817+
}
814818
const courseLimited = this.limitAIinCourseProject(tag);
815819

816820
// cache answer for a few seconds, in case this gets called a lot:

0 commit comments

Comments
 (0)