Prevent a user from reinstalling a package to be able to uninstall it and bypass the 'allowBackgroundServiceUninstallsFromUserInstallsOnly' feature #371
When the allowBackgroundServiceUninstallsFromUserInstallsOnly feature is enabled, users are only allowed to uninstall packages they have installed themselves. However, if the user runs choco upgrade <packagename> -y --force the package will force reinstall and then the user can uninstall the package that they previously could not. This also works within Chocolatey GUI with the Reinstall button.
Why Is It Needed
This effectively bypasses the feature that is implemented in the description. If we can add this functionality into the already existing feature that would be ideal in my opinion. I've tried coming at this from several angles but I can't think of a way to easily keep this from happening.
Adding a toggleable feature that can be set with a global command to hide the Reinstall button from Chocolatey GUI would be a wonderful addition to assist with this as well as more functionality for other customers as well.
Description
When the
allowBackgroundServiceUninstallsFromUserInstallsOnly
feature is enabled, users are only allowed to uninstall packages they have installed themselves. However, if the user runschoco upgrade <packagename> -y --force
the package will force reinstall and then the user can uninstall the package that they previously could not. This also works within Chocolatey GUI with the Reinstall button.Why Is It Needed
This effectively bypasses the feature that is implemented in the description. If we can add this functionality into the already existing feature that would be ideal in my opinion. I've tried coming at this from several angles but I can't think of a way to easily keep this from happening.
Adding a toggleable feature that can be set with a global command to hide the Reinstall button from Chocolatey GUI would be a wonderful addition to assist with this as well as more functionality for other customers as well.
Related Issues and Tickets
Zendesk Ticket 1
Zendesk Ticket 2
┆Issue is synchronized with this Gitlab issue by Unito