From e7fdac6b416e6f54b201cd4b87450faa0177658c Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 4 Nov 2022 15:58:41 -0500 Subject: [PATCH] Disable some menu items for everyone except Brent --- Mac/AppDelegate.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index 81c32ef93..f0b22efd6 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -487,14 +487,18 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, } #if !DEBUG - if item.action == #selector(debugDropConditionalGetInfo(_:)) || - item.action == #selector(debugTestCrashReporterWindow(_:)) || - item.action == #selector(debugTestCrashReportSending(_:)) || - item.action == #selector(forceCrash(_:)) { + if item.action == #selector(debugDropConditionalGetInfo(_:)) { return false } #endif + if item.action == #selector(debugTestCrashReporterWindow(_:)) || + item.action == #selector(debugTestCrashReportSending(_:)) || + item.action == #selector(forceCrash(_:)) { + let appIDPrefix = Bundle.main.infoDictionary?["AppIdentifierPrefix"] as! String + return appIDPrefix == "M8L2WTLA8W." + } + #if !MAC_APP_STORE if item.action == #selector(toggleWebInspectorEnabled(_:)) { (item as! NSMenuItem).state = AppDefaults.shared.webInspectorEnabled ? .on : .off