diff --git a/AutoPkgr.xcodeproj/project.pbxproj b/AutoPkgr.xcodeproj/project.pbxproj index 698c5dae..dd696117 100644 --- a/AutoPkgr.xcodeproj/project.pbxproj +++ b/AutoPkgr.xcodeproj/project.pbxproj @@ -34,6 +34,10 @@ 295D7358247336C1008B796A /* LGMicrosoftTeamsNotificationView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 295D7354247336C1008B796A /* LGMicrosoftTeamsNotificationView.xib */; }; 295D7359247336C1008B796A /* LGMicrosoftTeamsNotificationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 295D7356247336C1008B796A /* LGMicrosoftTeamsNotificationView.m */; }; 295D735C24733742008B796A /* LGMicrosoftTeamsNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 295D735A24733742008B796A /* LGMicrosoftTeamsNotification.m */; }; + 2974CFA124E703B400EC0647 /* LGSimpleMDMIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = 2974CFA024E703B400EC0647 /* LGSimpleMDMIntegration.m */; }; + 2974CFA424E704A600EC0647 /* LGSimpleMDMIntegrationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2974CFA324E704A600EC0647 /* LGSimpleMDMIntegrationView.m */; }; + 2974CFA724E704DC00EC0647 /* LGSimpleMDMIntegrationView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2974CFA524E704DC00EC0647 /* LGSimpleMDMIntegrationView.xib */; }; + 29E9D06525019A56007D9509 /* munkichoices.xml in Resources */ = {isa = PBXBuildFile; fileRef = 29E9D06425019A55007D9509 /* munkichoices.xml */; }; 5EF53CBDA5C7106F3847E9FD /* libPods-AutoPkgrTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B419CA189BE572FD31F74E0 /* libPods-AutoPkgrTests.a */; }; 6A53625D1988BE59008A949C /* LGTestPort.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A53625C1988BE59008A949C /* LGTestPort.m */; }; 8B1AF8521BED81440013BE37 /* LGFileWaveIntegrationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1AF8501BED81440013BE37 /* LGFileWaveIntegrationView.m */; }; @@ -329,6 +333,12 @@ 295D7356247336C1008B796A /* LGMicrosoftTeamsNotificationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LGMicrosoftTeamsNotificationView.m; sourceTree = ""; }; 295D735A24733742008B796A /* LGMicrosoftTeamsNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LGMicrosoftTeamsNotification.m; sourceTree = ""; }; 295D735B24733742008B796A /* LGMicrosoftTeamsNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LGMicrosoftTeamsNotification.h; sourceTree = ""; }; + 2974CF9F24E703B400EC0647 /* LGSimpleMDMIntegration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LGSimpleMDMIntegration.h; sourceTree = ""; }; + 2974CFA024E703B400EC0647 /* LGSimpleMDMIntegration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LGSimpleMDMIntegration.m; sourceTree = ""; }; + 2974CFA224E704A600EC0647 /* LGSimpleMDMIntegrationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LGSimpleMDMIntegrationView.h; sourceTree = ""; }; + 2974CFA324E704A600EC0647 /* LGSimpleMDMIntegrationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LGSimpleMDMIntegrationView.m; sourceTree = ""; }; + 2974CFA624E704DC00EC0647 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LGSimpleMDMIntegrationView.xib; sourceTree = ""; }; + 29E9D06425019A55007D9509 /* munkichoices.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = munkichoices.xml; sourceTree = ""; }; 2C6986FE5B41226735CC0A32 /* Pods-AutoPkgr.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoPkgr.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AutoPkgr/Pods-AutoPkgr.debug.xcconfig"; sourceTree = ""; }; 39CF6FA5E75D62254A994C22 /* libPods-AutoPkgr.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AutoPkgr.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 45E6F02919946C3F73535515 /* Pods-AutoPkgrTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoPkgrTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AutoPkgrTests/Pods-AutoPkgrTests.release.xcconfig"; sourceTree = ""; }; @@ -847,6 +857,7 @@ 1AC98423195DF6270071CAB3 /* Resources */ = { isa = PBXGroup; children = ( + 29E9D06425019A55007D9509 /* munkichoices.xml */, 1AC69568195B59EE00D2BD81 /* Images.xcassets */, 1A2C7FAC19CC9F8300CFF472 /* scripts */, 8BB217F519709A2C00EF8B93 /* AutoPkgrIcon.png */, @@ -1173,6 +1184,9 @@ 8B8654BC1CF6695F00B0A3FD /* LGFileWaveIntegrationView.xib */, BE32B0351B2735DF0071778B /* LGGitIntegrationView.h */, BE32B0361B2735DF0071778B /* LGGitIntegrationView.m */, + 2974CFA224E704A600EC0647 /* LGSimpleMDMIntegrationView.h */, + 2974CFA324E704A600EC0647 /* LGSimpleMDMIntegrationView.m */, + 2974CFA524E704DC00EC0647 /* LGSimpleMDMIntegrationView.xib */, 8BD9E7961C8E296A00BCB399 /* LGVirusTotalAnalyzerIntegrationView.h */, 8BD9E7971C8E296A00BCB399 /* LGVirusTotalAnalyzerIntegrationView.m */, 8B8654C31CF669A100B0A3FD /* LGVirusTotalAnalyzerIntegrationView.xib */, @@ -1325,6 +1339,8 @@ BE2337C91B3E42EC00256F85 /* LGMacPatchIntegration.m */, BE4DD53A1B11740900854FD8 /* LGMunkiIntegration.h */, BE4DD53D1B11743700854FD8 /* LGMunkiIntegration.m */, + 2974CF9F24E703B400EC0647 /* LGSimpleMDMIntegration.h */, + 2974CFA024E703B400EC0647 /* LGSimpleMDMIntegration.m */, 8BD9E78D1C8E16F000BCB399 /* LGVirusTotalAnalyzerIntegration.h */, 8BD9E78E1C8E16F000BCB399 /* LGVirusTotalAnalyzerIntegration.m */, ); @@ -1479,6 +1495,7 @@ 8B8654CF1CF66B8E00B0A3FD /* LGJSSImporterIntegrationView.xib in Resources */, 8B8654871CF64CA400B0A3FD /* LGRecipeReposViewController.xib in Resources */, 8B8655001CF66F7400B0A3FD /* LGRecipeSearchResultsPanel.xib in Resources */, + 2974CFA724E704DC00EC0647 /* LGSimpleMDMIntegrationView.xib in Resources */, 8B8655151CF6719F00B0A3FD /* LGViewWindowController.xib in Resources */, 8B8654801CF64A9600B0A3FD /* LGInstallViewController.xib in Resources */, 8B8654C81CF66B0F00B0A3FD /* LGGitIntegrationView.xib in Resources */, @@ -1492,6 +1509,7 @@ 8B86550E1CF670DA00B0A3FD /* LGSelectNotificationsWindowController.xib in Resources */, 8B8654F91CF66F1800B0A3FD /* LGJSSDistributionPointsPrefPanel.xib in Resources */, 8B86548E1CF64EE500B0A3FD /* LGScheduleViewController.xib in Resources */, + 29E9D06525019A56007D9509 /* munkichoices.xml in Resources */, 8B8654F21CF66EB500B0A3FD /* LGTemplateRenderWindowController.xib in Resources */, 8B8654A51CF665DF00B0A3FD /* LGAbsoluteManageIntegrationView.xib in Resources */, 295D7358247336C1008B796A /* LGMicrosoftTeamsNotificationView.xib in Resources */, @@ -2448,6 +2466,7 @@ BEEFE6CA1AEC760700882C89 /* LGAutoPkgIntegration.m in Sources */, BE59D8971B61998D0037F3CA /* BSDProcessInfo.m in Sources */, BEC1258919F046FA006696C4 /* main.m in Sources */, + 2974CFA124E703B400EC0647 /* LGSimpleMDMIntegration.m in Sources */, BED136B71AC3BE04003EBF0F /* NSArray+html_report.m in Sources */, BEEFE6BB1AE9E8A600882C89 /* LGLogger.m in Sources */, BE4DD53E1B11743700854FD8 /* LGMunkiIntegration.m in Sources */, @@ -2470,6 +2489,7 @@ BE344F551ABFBEAB00500AAE /* LGAutoPkgReport.m in Sources */, BE38EA8E1B0CFE68009FCBEB /* LGInstallViewController.m in Sources */, 295D735C24733742008B796A /* LGMicrosoftTeamsNotification.m in Sources */, + 2974CFA424E704A600EC0647 /* LGSimpleMDMIntegrationView.m in Sources */, BE38EA951B0CFE95009FCBEB /* LGRecipeReposViewController.m in Sources */, 1AC86D3D195E0AC6006FDD2B /* LGHostInfo.m in Sources */, BEC1258719F0465F006696C4 /* LGAutoPkgTask.m in Sources */, @@ -2693,6 +2713,14 @@ path = .; sourceTree = ""; }; + 2974CFA524E704DC00EC0647 /* LGSimpleMDMIntegrationView.xib */ = { + isa = PBXVariantGroup; + children = ( + 2974CFA624E704DC00EC0647 /* Base */, + ); + name = LGSimpleMDMIntegrationView.xib; + sourceTree = ""; + }; 8B8654821CF64A9600B0A3FD /* LGInstallViewController.xib */ = { isa = PBXVariantGroup; children = ( @@ -3117,8 +3145,8 @@ GCC_PREFIX_HEADER = "AutoPkgr/Supporting Files/AutoPkgr-Prefix.pch"; INFOPLIST_FILE = "AutoPkgr/Supporting Files/AutoPkgr-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 1.5.4; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MARKETING_VERSION = 1.5.5; OTHER_CODE_SIGN_FLAGS = ""; "OTHER_CODE_SIGN_FLAGS[sdk=*]" = "--options=runtime"; OTHER_LDFLAGS = ( @@ -3181,8 +3209,8 @@ GCC_PREFIX_HEADER = "AutoPkgr/Supporting Files/AutoPkgr-Prefix.pch"; INFOPLIST_FILE = "AutoPkgr/Supporting Files/AutoPkgr-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 1.5.4; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MARKETING_VERSION = 1.5.5; OTHER_CODE_SIGN_FLAGS = ""; "OTHER_CODE_SIGN_FLAGS[sdk=*]" = "--options=runtime"; OTHER_LDFLAGS = ( diff --git a/AutoPkgr.xcodeproj/xcshareddata/xcschemes/AutoPkgr.xcscheme b/AutoPkgr.xcodeproj/xcshareddata/xcschemes/AutoPkgr.xcscheme new file mode 100644 index 00000000..5a5923e1 --- /dev/null +++ b/AutoPkgr.xcodeproj/xcshareddata/xcschemes/AutoPkgr.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AutoPkgr/Models/AutoPkg Task/LGAutoPkgRecipe.m b/AutoPkgr/Models/AutoPkg Task/LGAutoPkgRecipe.m index 2cb6afaf..7c61a90e 100644 --- a/AutoPkgr/Models/AutoPkg Task/LGAutoPkgRecipe.m +++ b/AutoPkgr/Models/AutoPkg Task/LGAutoPkgRecipe.m @@ -177,9 +177,9 @@ - (void)setEnabled:(BOOL)enabled { /* We automatically handle the enabling of the MakeCatalogs recipe * so don't do anything if that's the one getting enabled. */ - if ([self.Name isEqualToString:kLGMakeCatalogsRecipeName]) { - return; - } + //if ([self.Name isEqualToString:kLGMakeCatalogsRecipeName]) { + //return; + //} /* This is all dispatched to a serial queue so a race condition doesn't raise * when multiple recipes are added or removed in rapid succession. */ @@ -218,7 +218,6 @@ - (void)setEnabled:(BOOL)enabled * now listed. If so re-add the MakeCatalogs recipe. */ [currentList enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { if ([obj rangeOfString:@"munki"].location != NSNotFound) { - [currentList addObject:kLGMakeCatalogsRecipeName]; *stop = YES; } }]; diff --git a/AutoPkgr/Models/Email & Notifications/LGGoogleHangoutsNotification.m b/AutoPkgr/Models/Email & Notifications/LGGoogleHangoutsNotification.m index e75f4a37..9200aa0d 100644 --- a/AutoPkgr/Models/Email & Notifications/LGGoogleHangoutsNotification.m +++ b/AutoPkgr/Models/Email & Notifications/LGGoogleHangoutsNotification.m @@ -32,7 +32,7 @@ @implementation LGGoogleHangoutsNotification #pragma mark - Protocol Conforming + (NSString *)serviceDescription { - return @"AutoPkgr Google Hangouts"; + return @"AutoPkgr Google Chat"; } + (BOOL)reportsIntegrations @@ -52,7 +52,7 @@ + (BOOL)storesInfoInKeychain + (NSString *)account { - return @"AutoPkgr Google Hangouts Webhook URL"; + return @"AutoPkgr Google Chat Webhook URL"; } + (NSURL *)serviceURL @@ -67,7 +67,12 @@ + (BOOL)templateIsFile + (NSString *)defaultTemplate { - return [self templateWithName:@"web_report" type:@"html"]; + return [self templateWithName:@"slack_report" type:@"md"]; +} + ++ (ACEMode)tempateFormat +{ + return ACEModeMarkdown; } #pragma mark - Send @@ -79,7 +84,7 @@ - (void)send:(void (^)(NSError *))complete - (void)sendTest:(void (^)(NSError *))complete { - [self sendMessage:NSLocalizedString(@"You are now set up to receive notifications in your Google Hangouts channel!", nil) title:nil complete:complete]; + [self sendMessage:NSLocalizedString(@"You are now set up to receive notifications in your Google Chat room!", nil) title:nil complete:complete]; } - (void)sendMessage:(NSString *)message title:(NSString *)title complete:(void (^)(NSError *))complete @@ -121,7 +126,7 @@ - (void)sendMessageWithParameters:(NSDictionary *)parameters self.notificatonComplete(nil); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - NSLog(@"Error sending Google Hangouts notification: %@", operation.responseString); + NSLog(@"Error sending Google notification: %@", operation.responseString); self.notificatonComplete([LGError errorWithResponse:operation.response]); }]; } diff --git a/AutoPkgr/Models/Integrations/Integration Manager/LGIntegrationManager.h b/AutoPkgr/Models/Integrations/Integration Manager/LGIntegrationManager.h index 86ec6ac4..290e5de2 100644 --- a/AutoPkgr/Models/Integrations/Integration Manager/LGIntegrationManager.h +++ b/AutoPkgr/Models/Integrations/Integration Manager/LGIntegrationManager.h @@ -28,6 +28,7 @@ #import "LGLANrevIntegration.h" #import "LGMacPatchIntegration.h" #import "LGMunkiIntegration.h" +#import "LGSimpleMDMIntegration.h" #import "LGVirusTotalAnalyzerIntegration.h" @class LGIntegration; diff --git a/AutoPkgr/Models/Integrations/Integration Manager/LGIntegrationManager.m b/AutoPkgr/Models/Integrations/Integration Manager/LGIntegrationManager.m index 0e24365c..ac397b7d 100644 --- a/AutoPkgr/Models/Integrations/Integration Manager/LGIntegrationManager.m +++ b/AutoPkgr/Models/Integrations/Integration Manager/LGIntegrationManager.m @@ -44,6 +44,7 @@ + (void)load [LGLANrevIntegration class], [LGMacPatchIntegration class], [LGMunkiIntegration class], + [LGSimpleMDMIntegration class], [LGVirusTotalAnalyzerIntegration class], ]; diff --git a/AutoPkgr/Models/Integrations/LGSimpleMDMIntegration.h b/AutoPkgr/Models/Integrations/LGSimpleMDMIntegration.h new file mode 100644 index 00000000..56fb3907 --- /dev/null +++ b/AutoPkgr/Models/Integrations/LGSimpleMDMIntegration.h @@ -0,0 +1,35 @@ +// +// LGSimpleMDMIntegration.h +// AutoPkgr +// +// Copyright 2020 Shawn Honsberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "LGDefaults.h" +#import "LGConstants.h" +#import "LGIntegration+Protocols.h" +#import "LGIntegration.h" + +@interface LGSimpleMDMIntegration : LGIntegration + +@end + +@interface LGSimpleMDMDefaults : LGDefaults + +@property (copy, nonatomic) NSString *SIMPLEMDM_API_KEY; +@property (copy, nonatomic) NSString *simpleMDMDomainObject; +@property (copy, nonatomic) NSString *setSimpleMDMDomainObject; + +@end diff --git a/AutoPkgr/Models/Integrations/LGSimpleMDMIntegration.m b/AutoPkgr/Models/Integrations/LGSimpleMDMIntegration.m new file mode 100644 index 00000000..9677c548 --- /dev/null +++ b/AutoPkgr/Models/Integrations/LGSimpleMDMIntegration.m @@ -0,0 +1,120 @@ +// +// LGSimpleMDMIntegration.m +// AutoPkgr +// +// Copyright 2020 Shawn Honsberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "LGIntegration+Protocols.h" +#import "LGSimpleMDMIntegration.h" +#import + +// Define the protocols you intend to conform to. +@interface LGSimpleMDMIntegration () + +@end + +@implementation LGSimpleMDMIntegration +@synthesize installedVersion = _installedVersion; + +#pragma mark - Class overrides ++ (NSString *)name +{ + return @"SimpleMDM plugin"; +} + ++ (NSString *)credits +{ + return @"Taylor Boyko\nhttps://github.com/SimpleMDM/munki-plugin"; +} + ++ (NSString *)gitHubURL +{ + return @"https://api.github.com/repos/SimpleMDM/munki-plugin/releases"; +} + ++ (NSString *)defaultRepository +{ + return @"https://github.com/SimpleMDM/munki-plugin.git"; +} + ++ (NSString *)binary +{ + return @"/usr/local/munki/munkilib/munkirepo/SimpleMDMRepo.py"; +} + ++ (NSArray *)components +{ + return @[ + [self binary], + @"/usr/local/simplemdm/munki-plugin/config.plist", + ]; +} + ++ (NSArray *)packageIdentifiers +{ + return @[ @"com.simplemdm.munki_plugin" ]; +} + ++ (BOOL)isUninstallable +{ + return NO; +} + ++ (NSString *)summaryResultKey +{ + return @"simplemdm_summary_result"; +} +#pragma mark - Instance overrides +- (NSString *)installedVersion +{ + return [NSDictionary dictionaryWithContentsOfFile:@"/private/var/db/receipts/com.simplemdm.munki_plugin.plist"][@"PackageVersion"]; +} + +/** + * Any custom install actions that need to be taken. + */ +- (void)customInstallActions:(void (^)(NSError *error))reply +{ + reply(nil); +} + +- (void)customUninstallActions:(void (^)(NSError *))reply +{ + LGSimpleMDMDefaults *defaults = [LGSimpleMDMDefaults new]; + // Set preferences back to their default settings. + defaults.SIMPLEMDM_API_KEY = nil; + + reply(nil); +} + +@end + +@implementation LGSimpleMDMDefaults + +// SIMPLEMDM_API_KEY + +- (NSString *)SIMPLEMDM_API_KEY +{ + return [self simpleMDMDomainObject:NSStringFromSelector(@selector(key))]; +} + +- (void)setSIMPLEMDM_API_KEY:(NSString *)SIMPLEMDM_API_KEY +{ + [self setSimpleMDMDomainObject:SIMPLEMDM_API_KEY forKey:NSStringFromSelector(@selector(key))]; +} + +@end diff --git a/AutoPkgr/Resources/munkichoices.xml b/AutoPkgr/Resources/munkichoices.xml new file mode 100644 index 00000000..3764cf7e --- /dev/null +++ b/AutoPkgr/Resources/munkichoices.xml @@ -0,0 +1,38 @@ + + + + + + attributeSetting + 1 + choiceAttribute + selected + choiceIdentifier + core + + + attributeSetting + 1 + choiceAttribute + selected + choiceIdentifier + admin + + + attributeSetting + 0 + choiceAttribute + selected + choiceIdentifier + app + + + attributeSetting + 0 + choiceAttribute + selected + choiceIdentifier + launchd + + + diff --git a/AutoPkgr/Supporting Files/AutoPkgr-Info.plist b/AutoPkgr/Supporting Files/AutoPkgr-Info.plist index 8ae9c917..bbe50d06 100755 --- a/AutoPkgr/Supporting Files/AutoPkgr-Info.plist +++ b/AutoPkgr/Supporting Files/AutoPkgr-Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 1444 + 1475 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/AutoPkgr/Supporting Files/en.lproj/Credits.rtf b/AutoPkgr/Supporting Files/en.lproj/Credits.rtf index ad153bf2..cd49932a 100644 --- a/AutoPkgr/Supporting Files/en.lproj/Credits.rtf +++ b/AutoPkgr/Supporting Files/en.lproj/Credits.rtf @@ -1,5 +1,5 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf600 -{\fonttbl\f0\fnil\fcharset0 HelveticaNeue-Light;\f1\fnil\fcharset0 HelveticaNeue-Medium;} +{\rtf1\ansi\ansicpg1252\cocoartf2513 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 HelveticaNeue-Light;\f1\fnil\fcharset0 HelveticaNeue-Medium;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \vieww9600\viewh8400\viewkind0 @@ -28,7 +28,7 @@ and Eldon Ahrold\ \f1 \cf0 Ongoing development:\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0 -\f0 \cf0 Shawn Honsberger and Elliot Jordan\ +\f0 \cf0 Shawn Honsberger\ \ AutoPkgr takes advantage of the following awesome open-source libraries and projects:\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0 diff --git a/AutoPkgr/Supporting Files/en.lproj/LocalizableHelpPopover.strings b/AutoPkgr/Supporting Files/en.lproj/LocalizableHelpPopover.strings index 6cc68232..e75d95d1 100644 --- a/AutoPkgr/Supporting Files/en.lproj/LocalizableHelpPopover.strings +++ b/AutoPkgr/Supporting Files/en.lproj/LocalizableHelpPopover.strings @@ -17,8 +17,8 @@ "microsoftTeamsHelpInfoURL" = "https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/connectors#setting-up-a-custom-incoming-webhook"; -"googleHangoutsInfoTitle" = "Google Hangouts Notifications"; -"googleHangoutsHelpInfo" = "Incoming Webhooks are a simple way to post messages from external sources into Google Hangouts. Navigate to the link below to view instructions on how to generate a Incoming Webhook URL."; +"googleHangoutsInfoTitle" = "Google Notifications"; +"googleHangoutsHelpInfo" = "Incoming Webhooks are a simple way to post messages from external sources into Google Chat/Hangouts. Navigate to the link below to view instructions on how to generate a Incoming Webhook URL."; "googleHangoutsHelpInfoURL" = "https://developers.google.com/hangouts/chat/how-tos/webhooks"; diff --git a/AutoPkgr/Supporting Files/es.lproj/Credits.rtf b/AutoPkgr/Supporting Files/es.lproj/Credits.rtf index 815dab32..0589cc37 100644 --- a/AutoPkgr/Supporting Files/es.lproj/Credits.rtf +++ b/AutoPkgr/Supporting Files/es.lproj/Credits.rtf @@ -1,5 +1,5 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf600 -{\fonttbl\f0\fnil\fcharset0 HelveticaNeue-Light;\f1\fnil\fcharset0 HelveticaNeue-Medium;} +{\rtf1\ansi\ansicpg1252\cocoartf2513 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 HelveticaNeue-Light;\f1\fnil\fcharset0 HelveticaNeue-Medium;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \vieww9600\viewh8400\viewkind0 @@ -28,7 +28,7 @@ y Eldon Ahrold\ \f1 \cf0 Desarrollo:\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0 -\f0 \cf0 Shawn Honsberger y Elliot Jordan \ +\f0 \cf0 Shawn Honsberger \ \ AutoPkgr hace uso de los siguientes proyectos de c\'f3digo abierto:\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0 diff --git a/AutoPkgr/Supporting Files/fr.lproj/Credits.rtf b/AutoPkgr/Supporting Files/fr.lproj/Credits.rtf index 1781c237..814607f5 100644 --- a/AutoPkgr/Supporting Files/fr.lproj/Credits.rtf +++ b/AutoPkgr/Supporting Files/fr.lproj/Credits.rtf @@ -1,5 +1,5 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf600 -{\fonttbl\f0\fnil\fcharset0 HelveticaNeue-Light;\f1\fnil\fcharset0 HelveticaNeue-Medium;} +{\rtf1\ansi\ansicpg1252\cocoartf2513 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 HelveticaNeue-Light;\f1\fnil\fcharset0 HelveticaNeue-Medium;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \vieww10380\viewh9420\viewkind0 @@ -28,7 +28,7 @@ et Eldon Ahrold\ \f1 \cf0 \'c9quipe technique actuelle:\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0 -\f0 \cf0 Shawn Honsberger et Elliot Jordan\ +\f0 \cf0 Shawn Honsberger\ \ AutoPkgr s\'92appuie sur des biblioth\'e8ques et des projets open-source formidables\'a0:\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0 diff --git a/AutoPkgr/Utility/LGConstants.h b/AutoPkgr/Utility/LGConstants.h index c86b607d..5eb8041d 100755 --- a/AutoPkgr/Utility/LGConstants.h +++ b/AutoPkgr/Utility/LGConstants.h @@ -21,6 +21,7 @@ #pragma mark - App Names extern NSString *const kLGApplicationName; extern NSString *const kLGAutoPkgPreferenceDomain; +extern NSString *const kLGSimpleMDMPreferenceDomain; extern NSString *const kLGAutoPkgrPreferenceDomain; extern NSString *const kLGAutoPkgrHelperToolName; extern NSString *const kLGAutoPkgrLaunchDaemonPlist; diff --git a/AutoPkgr/Utility/LGConstants.m b/AutoPkgr/Utility/LGConstants.m index a44b1098..cfbfdc5d 100755 --- a/AutoPkgr/Utility/LGConstants.m +++ b/AutoPkgr/Utility/LGConstants.m @@ -23,6 +23,7 @@ #pragma mark - App Names NSString *const kLGApplicationName = @"AutoPkgr"; NSString *const kLGAutoPkgPreferenceDomain = @"com.github.autopkg"; +NSString *const kLGSimpleMDMPreferenceDomain = @"/usr/local/simplemdm/munki-plugin/config.plist"; NSString *const kLGAutoPkgrPreferenceDomain = @"com.lindegroup.AutoPkgr"; NSString *const kLGAutoPkgrHelperToolName = @"com.lindegroup.AutoPkgr.helper"; NSString *const kLGAutoPkgrLaunchDaemonPlist = @"com.lindegroup.AutoPkgr.schedule"; diff --git a/AutoPkgr/Utility/LGDefaults.h b/AutoPkgr/Utility/LGDefaults.h index 6f1f54cb..70ceb64e 100644 --- a/AutoPkgr/Utility/LGDefaults.h +++ b/AutoPkgr/Utility/LGDefaults.h @@ -87,6 +87,10 @@ typedef NS_OPTIONS(NSInteger, LGReportItems) { - (id)autoPkgDomainObject:(NSString *)key; - (void)setAutoPkgDomainObject:(id)object forKey:(NSString *)key; +#pragma mark - SimpleMDM Accessor methods +- (id)simpleMDMDomainObject:(NSString *)key; +- (void)setSimpleMDMDomainObject:(id)object forKey:(NSString *)key; + #pragma Class Methods + (BOOL)fixRelativePathsInAutoPkgDefaults:(NSError **)error neededFixing:(NSInteger *)neededFixing; diff --git a/AutoPkgr/Utility/LGDefaults.m b/AutoPkgr/Utility/LGDefaults.m index cd96beb1..f4db60e3 100644 --- a/AutoPkgr/Utility/LGDefaults.m +++ b/AutoPkgr/Utility/LGDefaults.m @@ -318,6 +318,21 @@ - (void)setAutoPkgDomainObject:(id)object forKey:(NSString *)key (__bridge CFStringRef)(kLGAutoPkgPreferenceDomain)); } +#pragma mark - CFPrefs +- (id)simpleMDMDomainObject:(NSString *)key +{ + id value = CFBridgingRelease(CFPreferencesCopyAppValue((__bridge CFStringRef)(key), + (__bridge CFStringRef)(kLGSimpleMDMPreferenceDomain))); + return value; +} + +- (void)setSimpleMDMDomainObject:(id)object forKey:(NSString *)key +{ + CFPreferencesSetAppValue((__bridge CFStringRef)(key), + (__bridge CFTypeRef)(object), + (__bridge CFStringRef)(kLGSimpleMDMPreferenceDomain)); +} + #pragma mark - Class Methods + (NSString *)formattedDate:(NSDate *)date { diff --git a/AutoPkgr/Views-Controllers-XIB/Integration Views/Base.lproj/LGSimpleMDMIntegrationView.xib b/AutoPkgr/Views-Controllers-XIB/Integration Views/Base.lproj/LGSimpleMDMIntegrationView.xib new file mode 100644 index 00000000..3d85bd8a --- /dev/null +++ b/AutoPkgr/Views-Controllers-XIB/Integration Views/Base.lproj/LGSimpleMDMIntegrationView.xib @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSAllRomanInputSourcesLocaleIdentifier + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AutoPkgr/Views-Controllers-XIB/Integration Views/LGSimpleMDMIntegrationView.h b/AutoPkgr/Views-Controllers-XIB/Integration Views/LGSimpleMDMIntegrationView.h new file mode 100644 index 00000000..370f0384 --- /dev/null +++ b/AutoPkgr/Views-Controllers-XIB/Integration Views/LGSimpleMDMIntegrationView.h @@ -0,0 +1,24 @@ +// +// LGSimpleMDMIntegrationView.h +// AutoPkgr +// +// Copyright 2020 Shawn Honsberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#import "LGBaseIntegrationViewController.h" + +@interface LGSimpleMDMIntegrationView : LGBaseIntegrationViewController + +@end diff --git a/AutoPkgr/Views-Controllers-XIB/Integration Views/LGSimpleMDMIntegrationView.m b/AutoPkgr/Views-Controllers-XIB/Integration Views/LGSimpleMDMIntegrationView.m new file mode 100644 index 00000000..45f1aab3 --- /dev/null +++ b/AutoPkgr/Views-Controllers-XIB/Integration Views/LGSimpleMDMIntegrationView.m @@ -0,0 +1,83 @@ +// +// LGSimpleMDMIntegrationView.m +// AutoPkgr +// +// Copyright 2020 Shawn Honsberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + + +#import "LGSimpleMDMIntegration.h" +#import "LGSimpleMDMIntegrationView.h" + +#import "LGDefaults.h" +#import "LGConstants.h" +#import "LGAutoPkgTask.h" +#import "LGAutopkgr.h" +#import "LGInstaller.h" + +#import "NSTextField+safeStringValue.h" +@interface LGSimpleMDMIntegrationView () + +@property (weak) IBOutlet NSTextField *SimpleMDMApiKeyTF; + +@property (nonatomic, strong) LGSimpleMDMDefaults *defaults; +@property (nonatomic, strong) LGSimpleMDMDefaults *SIMPLEMDM_API_KEY; +@property BOOL customTokenEnabled; + +@end + +@implementation LGSimpleMDMIntegrationView + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do view setup here. +} + +- (void)awakeFromNib +{ + _defaults = [[LGSimpleMDMDefaults alloc] init]; + + _SimpleMDMApiKeyTF.delegate = self; + _SimpleMDMApiKeyTF.safe_stringValue = _defaults.SIMPLEMDM_API_KEY; + +} + +- (IBAction)tokenTypeChanged:(NSMatrix *)matrix +{ + if (matrix.selectedRow == 0) { + _defaults.SIMPLEMDM_API_KEY = nil; + } + else { + _defaults.SIMPLEMDM_API_KEY = _SimpleMDMApiKeyTF.stringValue; + } +} + +- (void)controlTextDidChange:(NSNotification *)notification +{ + + // SIMPLEMDM_API_KEY + if ([notification.object isEqualTo:_SimpleMDMApiKeyTF]) { + _defaults.SIMPLEMDM_API_KEY = [notification.object stringValue]; + } +} + +@synthesize description; + +@synthesize hash; + +@synthesize superclass; + +@end diff --git a/AutoPkgr/Views-Controllers-XIB/Recipes & Repos Table Controllers/LGRecipeTableViewController.m b/AutoPkgr/Views-Controllers-XIB/Recipes & Repos Table Controllers/LGRecipeTableViewController.m index 8f83e5e8..2229778d 100644 --- a/AutoPkgr/Views-Controllers-XIB/Recipes & Repos Table Controllers/LGRecipeTableViewController.m +++ b/AutoPkgr/Views-Controllers-XIB/Recipes & Repos Table Controllers/LGRecipeTableViewController.m @@ -279,7 +279,7 @@ - (void)runRecipesFromMenu:(NSMenuItem *)item LGAutoPkgRecipe *recipe = _searchedRecipes[idx]; [recipes addObject:recipe.Identifier]; if ([predicate evaluateWithObject:recipe]) { - runMakeCatalogs = YES; + runMakeCatalogs = NO; } }]; diff --git a/AutoPkgr/Views-Controllers-XIB/Tab Views/Base.lproj/LGIntegrationsViewController.xib b/AutoPkgr/Views-Controllers-XIB/Tab Views/Base.lproj/LGIntegrationsViewController.xib index 862be0c1..cddaa333 100644 --- a/AutoPkgr/Views-Controllers-XIB/Tab Views/Base.lproj/LGIntegrationsViewController.xib +++ b/AutoPkgr/Views-Controllers-XIB/Tab Views/Base.lproj/LGIntegrationsViewController.xib @@ -1,9 +1,9 @@ - - + + - - + + @@ -23,14 +23,14 @@ - + - - + + - - + + @@ -40,11 +40,11 @@ - - + + - + @@ -52,8 +52,8 @@ - - - - + + @@ -89,11 +89,11 @@ - - + + - + @@ -101,8 +101,8 @@ - - - - + + - + @@ -139,8 +139,8 @@ - - - - + + @@ -177,62 +177,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - - + + - + - - + + - @@ -247,14 +246,14 @@ - @@ -271,13 +270,14 @@ - + + @@ -305,27 +305,24 @@ - - + + + + + + - - - - - - - - diff --git a/AutoPkgr/Views-Controllers-XIB/Tab Views/Base.lproj/LGNotificationsViewController.xib b/AutoPkgr/Views-Controllers-XIB/Tab Views/Base.lproj/LGNotificationsViewController.xib index d84b6c09..e2b7e9bf 100644 --- a/AutoPkgr/Views-Controllers-XIB/Tab Views/Base.lproj/LGNotificationsViewController.xib +++ b/AutoPkgr/Views-Controllers-XIB/Tab Views/Base.lproj/LGNotificationsViewController.xib @@ -1,8 +1,8 @@ - + - + @@ -68,7 +68,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -99,7 +99,7 @@ - + @@ -110,7 +110,7 @@ - + @@ -130,7 +130,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -225,7 +225,7 @@ - + @@ -238,7 +238,7 @@ - + @@ -249,7 +249,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -456,7 +456,7 @@ - + diff --git a/AutoPkgr/Views-Controllers-XIB/Tab Views/LGIntegrationsViewController.m b/AutoPkgr/Views-Controllers-XIB/Tab Views/LGIntegrationsViewController.m index a5120b6d..9797d62c 100644 --- a/AutoPkgr/Views-Controllers-XIB/Tab Views/LGIntegrationsViewController.m +++ b/AutoPkgr/Views-Controllers-XIB/Tab Views/LGIntegrationsViewController.m @@ -30,6 +30,7 @@ #import "LGMacPatchIntegrationView.h" #import "LGMunkiIntegrationView.h" #import "LGTableCellViews.h" +#import "LGSimpleMDMIntegrationView.h" #import "LGVirusTotalAnalyzerIntegrationView.h" #import "NSOpenPanel+typeChooser.h" @@ -69,7 +70,7 @@ - (void)setModalWindow:(NSWindow *)modalWindow - (NSString *)tabLabel { - return NSLocalizedString(@"Folders & Integration", @"Tab label"); + return NSLocalizedString(@"Integrations", @"Tab label"); } #pragma mark - Integration config diff --git a/CHANGELOG.md b/CHANGELOG.md index 87ccfcbe..4ca45f07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file. This projec ## [Unreleased](unreleased) +## [1.5.5] - 2020-09-22 + +### Added +- AutoPkgr now integrates with the [SimpleMDM Munki repo plugin](https://github.com/SimpleMDM/munki-plugin). Big thanks to [@tboyko](https://github.com/tboyko) for a great collaboration! +### Changed +- Attention Munki Users: In order to eliminate confusion, AutoPkgr will no longer automatically add the MakeCatalogs.munki recipe to the end of your recipe list. If you would like to add it, you should create an override of the MakeCatalogs.munki recipe and add it to your recipe list. Since the introduction of [recipe trust information](https://github.com/autopkg/autopkg/wiki/Autopkg-and-recipe-parent-trust-info) in AutoPkg 1.0, we recommend that you create an override of MakeCatalogs.munki, instead of running the recipe itself. Make sure to check the box to include the MakeCatalogs.munki in your schedule. It will no longer be included automatically. +- Updated the Folders & Integrations tab to "Integrations." +- The minimum macOS build to run AutoPkgr is now macOS 10.13. It is recommended to run at least macOS 10.13.6 with AutoPkgr. 10.14.6 and above is even better. If you need to run below macOS 10.13, please consider using version 1.5.4 or below of AutoPkgr. +- Updated ongoing development credits. +### Fixed +- Updated to Google Chat verbiage (in place of Hangouts). +- Updated the "AutoPkgr Google Chat" Template. This no longer needs to be edited. + ## [1.5.4] - 2020-07-28 ### Added @@ -481,7 +494,9 @@ All notable changes to this project will be documented in this file. This projec - Initial public release of AutoPkgr. -[unreleased]: https://github.com/lindegroup/autopkgr/compare/v1.5.3...HEAD +[unreleased]: https://github.com/lindegroup/autopkgr/compare/v1.5.5...HEAD +[1.5.5]: https://github.com/lindegroup/autopkgr/compare/v1.5.4...v1.5.5 +[1.5.4]: https://github.com/lindegroup/autopkgr/compare/v1.5.3...v1.5.4 [1.5.3]: https://github.com/lindegroup/autopkgr/compare/v1.5.2...v1.5.3 [1.5.2]: https://github.com/lindegroup/autopkgr/compare/v1.5.1...v1.5.2 [1.5.1]: https://github.com/lindegroup/autopkgr/compare/v1.5...v1.5.1 diff --git a/README.md b/README.md index 3891828b..bce67093 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,7 @@ To configure AutoPkgr to add updates directly into your Munki repository, follow You'll also want to make sure you have `.munki` recipes selected for each app you want to import. Once the new versions of apps appear in your Munki repo, you can add them to the appropriate catalogs and manifests to deploy them. -When you select any `.munki` recipes selected, AutoPkgr will automatically add MakeCatalogs.munki to the end of your recipe list. MakeCatalogs is a special recipe that rebuilds your Munki catalogs after any items are imported. +Once you have your `.munki` recipes selected, make sure to add MakeCatalogs.munki to your recipe list. MakeCatalogs is a special recipe that rebuilds your Munki catalogs after any items are imported. Since the introduction of [recipe trust information](https://github.com/autopkg/autopkg/wiki/Autopkg-and-recipe-parent-trust-info) in AutoPkg 1.0, we recommend that you create an override of MakeCatalogs instead of running the recipe itself. To do this, follow these steps: @@ -202,7 +202,7 @@ Since the introduction of [recipe trust information](https://github.com/autopkg/ ![MakeCatalogs Override](doc-images/makecatalogs_override.png) -That's it! You only need to create that override once. And you do _not_ need to check the box to include MakeCatalogs.munki in your schedule. It will be included automatically. +1. That's it! You only need to create that override once. Make sure to check the box to include the MakeCatalogs.munki in your schedule. It will no longer be included automatically. ### Integration with Jamf Pro @@ -461,7 +461,7 @@ After uninstalling, you can drag the AutoPkgr app from your Applications folder AutoPkgr was created at [Linde Group](http://www.lindegroup.com) in Emeryville, California. If you're a talented Mac admin looking for a job in the Bay Area, [check out our job listings](http://www.lindegroup.com/careers/). We've got a wonderful team of people and fantastic clients. -AutoPkgr was originally created by James Barclay, Elliot Jordan, and Josh Senick in June 2014, and development was led by Eldon Ahrold until 2016. Current development is led by Shawn Honsberger and Elliot Jordan. +AutoPkgr was originally created by James Barclay, Elliot Jordan, and Josh Senick in June 2014. Development was led by Eldon Ahrold until 2016 and Elliot Jordan until 2017. Elliot continued to contribute to development in 2020. Current development is led by Shawn Honsberger. Thanks to Guillaume Gete for helping with the French localization, and to Luis Giraldo for the Spanish localization.