macadmins / nudge

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

Request: if the user selects primaryQuitButton, func setDeferralTime should add the duration of the current refreshCycle timer when setting the deferRunUntil time. #548

Closed bradtchapman closed 3 months ago

bradtchapman commented 7 months ago

https://github.com/macadmins/nudge/blob/92a5e13d821824df58aa01c5a0e369e47ef271c5/Nudge/Utilities/Utils.swift#L872

Please update this function and any relevant functions to take into account the current refreshCycle timers used for initial-, approaching-, and imminentRefreshCycles.

The request here is to allow administrators to guarantee that Nudge will not appear again before the promised refresh interval, whether they ignore the app or if they choose to quit / defer it until later.

erikng commented 4 months ago

Are there any concerns that the refreshCycles are smaller in seconds than the launchagent interval in seconds? Let's say an admin has set the imminent refreshcycle to less than 30 minutes, but the launch agent is only going to do every 30. I can see how this is beneficial for the inverse, which is likely why you asked for it, but the inverse issue will then occur.

I've personally always seen primaryQuitButton as the easiest escape hatch, but that it will then rely on your launch agent triggers. If users want more control, they use the other options afforded to them by taking a few seconds out of their day to figure out what's best for them.

I'm worried if I add this, it's just giving people longer times away from updating with even more convenience.

erikng commented 3 months ago

I spoke with Brad and this concern is not valid for him. This makes the code easier to implement if I ignore this problem, with the caveat that this is opt-in by the admin and they understand this.

erikng commented 3 months ago

Feature added here https://github.com/macadmins/nudge/commit/bb6dee953e59f7d30730b00b7e457d7614ea21f0

The function you mentioned was not where the logic needed to be added as the primary quit button behaves differently.