fix: point local network permission to correct mac settings
This commit is contained in:
@@ -357,7 +357,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, WKNavigationDelegate {
|
||||
"notifications": "x-apple.systempreferences:com.apple.Notifications-Settings.extension",
|
||||
"microphone": "x-apple.systempreferences:com.apple.preference.security?Privacy_Microphone",
|
||||
"camera": "x-apple.systempreferences:com.apple.preference.security?Privacy_Camera",
|
||||
"localNetwork": "x-apple.systempreferences:com.apple.preference.security?Privacy_LocalNetwork",
|
||||
"localNetwork": "x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?privacy-localnetwork",
|
||||
]
|
||||
return URL(string: mapping[target] ?? mapping["all"]!)
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ const MACOS_PERMISSION_SETTINGS = {
|
||||
notifications: "x-apple.systempreferences:com.apple.Notifications-Settings.extension",
|
||||
microphone: "x-apple.systempreferences:com.apple.preference.security?Privacy_Microphone",
|
||||
camera: "x-apple.systempreferences:com.apple.preference.security?Privacy_Camera",
|
||||
localNetwork: "x-apple.systempreferences:com.apple.preference.security?Privacy_LocalNetwork",
|
||||
localNetwork: "x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?privacy-localnetwork",
|
||||
};
|
||||
|
||||
const AUTO_PREFLIGHT_PERMISSION_KEYS = new Set(["accessibility", "screenRecording", "automation"]);
|
||||
|
||||
@@ -63,6 +63,10 @@ test("boss-agent status exposes unbound QR binding and local permission states",
|
||||
status.permissionSetup.actions.every((action) => action.settingsUrl.startsWith("x-apple.systempreferences:")),
|
||||
true,
|
||||
);
|
||||
assert.equal(
|
||||
status.permissionSetup.actions.find((action) => action.key === "localNetwork")?.settingsUrl,
|
||||
"x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?privacy-localnetwork",
|
||||
);
|
||||
assert.deepEqual(
|
||||
status.permissions.items.map((item) => [item.key, item.status]),
|
||||
[
|
||||
@@ -248,6 +252,7 @@ test("boss-agent mac app intercepts permission links and triggers native app per
|
||||
assert.match(swiftSource, /nativePermissionQueryItems/);
|
||||
assert.match(swiftSource, /nativeCamera/);
|
||||
assert.match(swiftSource, /nativeMicrophone/);
|
||||
assert.match(swiftSource, /privacy-localnetwork/);
|
||||
assert.match(swiftSource, /func application\(_ application: NSApplication, open urls: \[URL\]\)/);
|
||||
assert.match(swiftSource, /isBossAgentDeepLink/);
|
||||
assert.match(swiftSource, /AVCaptureDevice\.authorizationStatus\(for: \.video/);
|
||||
|
||||
Reference in New Issue
Block a user