macadmins / nudge

A tool for encouraging the installation of macOS security updates.
Apache License 2.0
1.03k stars 187 forks source link

Feature request: Pre Action before opening Software Update window #340

Closed marcelpogorzelski closed 7 months ago

marcelpogorzelski commented 2 years ago

The ability to add an action that runs after user presses Update Device and before the software update opens. It's similar to actionButtonPath but after resolving the action it continues with the build in dynamic capability for updateDevice.

The though behind this is the feature to add a logic that elevates users too administrators if needed. We use Privileges in our environment, this feature would ensure us the user is admin when entering software update.

erikng commented 2 years ago

I'm not sure how to accommodate this as I would have no way for Nudge to understand when another tool outside of its control is complete. I don't have any interesting coding specific things to Privileges, so unless you can outline what generic ruleset Nudge could use to determine this, I will likely close this feature request.

flammable commented 2 years ago

If you're asking users to update their device (like, from 12.3 to 12.3.1), that does not require admin privileges - only volume owner credentials if the device has an Apple Silicon chip. Only OS upgrades (example: upgrading from Big Sur to Monterey) require admin privileges.

marcelpogorzelski commented 2 years ago

I am unfortunately not familiar with Swift. I was thinking that the Pre Action as a shell command that does what we want then finishes. After that Update Device would trigger. Nudge wouldn't need to know what the Pre Action actually did. It just waits for the Pre Action to finish and continues as usual after that.

colorenz commented 2 years ago

Do you need Adminrights for the shell command, to give the user admin rights with SAP Privileges APP? Then it is not possible because nudge only runs in the User Context.

You could bundle the update device button with a Jamf policy or Munki policy to achieve this.

marcelpogorzelski commented 1 year ago

The command doesn't need admin rights. I want to run open /Applications/Privileges.app which prompts the user to elevate their account to admin.

bradtchapman commented 7 months ago

@erikng : this is no longer needed for non-admin users from macOS 12.3 onward.