Skip to content

Commit

Permalink
add allowNTLMCredentialsForDomains option to enterprise config file
Browse files Browse the repository at this point in the history
  • Loading branch information
sliezz committed Jan 5, 2025
1 parent 13f3818 commit 8aa4e67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/common/config-schemata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ export const configSchemata = {
export const enterpriseConfigSchemata = {
...configSchemata,
presetOrganizations: z.string().array(),
allowNTLMCredentialsForDomains: z.string().array(),
};
7 changes: 7 additions & 0 deletions app/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import * as t from "../common/translation-util.js";
import type {RendererMessage} from "../common/typed-ipc.js";
import type {MenuProperties} from "../common/types.js";

import * as EnterpriseUtil from "../common/enterprise-util.js";

import {appUpdater, shouldQuitForUpdate} from "./autoupdater.js";
import * as BadgeSettings from "./badge-settings.js";
import handleExternalLink from "./handle-external-link.js";
Expand Down Expand Up @@ -207,6 +209,11 @@ function createMainWindow(): BrowserWindow {
const ses = session.fromPartition("persist:webviewsession");
ses.setUserAgent(`ZulipElectron/${app.getVersion()} ${ses.getUserAgent()}`);

const allowNTLMCredentialsForDomains = EnterpriseUtil.getConfigItem("allowNTLMCredentialsForDomains", []);
for (const url of allowNTLMCredentialsForDomains) {
ses.allowNTLMCredentialsForDomains(url)
}

function configureSpellChecker() {
const enable = ConfigUtil.getConfigItem("enableSpellchecker", true);
if (enable && process.platform !== "darwin") {
Expand Down

0 comments on commit 8aa4e67

Please sign in to comment.