From 5ad2dc23df6b32b32d2ea27c5bc79f34a9c68665 Mon Sep 17 00:00:00 2001 From: leslie helou Date: Fri, 9 Feb 2024 22:18:01 -0500 Subject: [PATCH] update readme --- README.md | 5 +++-- prune/JamfPro.swift | 6 +++--- prune/LoginViewController.swift | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index eb0acfc..bcdf034 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Once the list of unused items is generated you can edit it within the app. If y Computer Groups - Check for usage in policies, computer configuration profiles, computer groups, eBooks, restricted software, advanced searches, enabled state + Check for usage in policies, computer configuration profiles, computer groups, eBooks, restricted software, advanced searches, app installers, enabled state Computer Profiles @@ -100,13 +100,14 @@ Once the list of unused items is generated you can edit it within the app. If y * **Policies** scoped only to users and/or user groups will show as unused due to an issue with the API (it doesn't list the users or user groups). * **Mac App** enabled/disabled state is not available via the API and thus not used to determine usage. * **Bookmarks** are not accessible via the API. As a result groups that are only used to scope bookmarks will show as unused. -* **App-Installer** are not available through the API. As a result groups used for scoping may erroneously show as unused. Logging information is written to: ```~/Library/Containers/com.jamf.pse.prune/Data/Library/Logs/Prune.log```


### History: +2024-02-09 - v3.2.1: Query App Installers for groups used for scoping. + 2024-02-04 - v3.2.0: Update login window. Add support for bearer token. Provide an alert if some lookups fail, which may result in inaccurate results. 2023-10-15 - v3.1.1: Fix issue #42. Updated token refresh process to address issue #41 and update logging. diff --git a/prune/JamfPro.swift b/prune/JamfPro.swift index 1b9b93e..2aed4e0 100644 --- a/prune/JamfPro.swift +++ b/prune/JamfPro.swift @@ -44,7 +44,7 @@ class JamfPro: NSObject, URLSessionDelegate { if id != "" && id != "0" { urlString = urlString + "/\(id)" } - print("[Jpapi] urlString: \(urlString)") +// print("[Jpapi] urlString: \(urlString)") let url = URL(string: "\(urlString)") let configuration = URLSessionConfiguration.ephemeral @@ -67,10 +67,10 @@ class JamfPro: NSObject, URLSessionDelegate { (data, response, error) -> Void in session.finishTasksAndInvalidate() if let httpResponse = response as? HTTPURLResponse { - print("[jpapiAction] \(endpoint) - status code \(httpResponse.statusCode).") +// print("[jpapiAction] \(endpoint) - status code \(httpResponse.statusCode).") if httpResponse.statusCode >= 200 && httpResponse.statusCode <= 299 { let json = try? JSONSerialization.jsonObject(with: data!, options: .allowFragments) - print("[Jpapi] json: \(String(describing: json))") +// print("[Jpapi] json: \(String(describing: json))") if let endpointJSON = json as? [String:Any] { completion(endpointJSON) return diff --git a/prune/LoginViewController.swift b/prune/LoginViewController.swift index d53e956..ff0d184 100644 --- a/prune/LoginViewController.swift +++ b/prune/LoginViewController.swift @@ -480,7 +480,7 @@ class LoginViewController: NSViewController, NSTextFieldDelegate { } func setWindowSize(setting: Int) { - print("[setWindowSize] setting: \(setting)") +// print("[setWindowSize] setting: \(setting)") if setting == 0 { preferredContentSize = CGSize(width: 518, height: 85) hideCreds_button.toolTip = "show username/password fields" @@ -541,7 +541,7 @@ class LoginViewController: NSViewController, NSTextFieldDelegate { // jamfProPassword_textfield.delegate = self lastServer = defaults.string(forKey: "currentServer") ?? "" - print("[viewDidLoad] lastServer: \(lastServer)") +// print("[viewDidLoad] lastServer: \(lastServer)") var foundServer = false useApiClient = defaults.integer(forKey: "sourceUseApiClient")