Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide ability to set configuration at the machine level, rather than just at user level #602

Closed
gep13 opened this issue Jun 18, 2018 · 3 comments
Labels
Feature Issues that introduce new functionality to the project, instead of updating existing functionality
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Jun 18, 2018

At the minute, the Chocolatey GUI settings:

image

are configured on a person user basis. It should be possible to allow settings these options globally, with the ability for users to configure these to their own needs, if required. They will help with administrative deployments of Chocolatey GUI.

This should include the ability to roll back setting to the globally configured defaults.

Also, for an administrative user, when making a change, it should be possible to specify whether the change is to the global setting, or to the local user setting.

@gep13 gep13 added the Feature Issues that introduce new functionality to the project, instead of updating existing functionality label Jun 18, 2018
@gep13
Copy link
Member Author

gep13 commented Jul 13, 2018

Following a discussion with @ferventcoder it makes sense that these global configuration options should be added to the main chocolatey.config file. This is already starting to house configuration for other parts of the Chocolatey ecosystem, like CCM and Chocolatey Agent, so it makes sense that this should also house configuration data for Chocolatey GUI.

@gep13 gep13 added Customer Bug reported or feature requested by a licensed customer of Chocolatey Pro/Business Issues only relevant for Pro or Business customers labels Jun 3, 2020
@gep13 gep13 added this to the 0.18.0 milestone Jun 12, 2020
gep13 added a commit to gep13/ChocolateyGUI that referenced this issue Jun 15, 2020
gep13 added a commit to gep13/ChocolateyGUI that referenced this issue Jan 25, 2021
gep13 added a commit to gep13/ChocolateyGUI that referenced this issue Jan 25, 2021
This introduces the concept of a data.db file in the
C:/ProgramData/Chocolatey GUI folder, which will house the global
configuration for the application.

Calling chocolateyguicli feature or config with the --global flag will
set the data.db in this new location.  Without the --global flag, the
setting will be made in the users data.db file, as normal.

Then, the effective configuration, i.e. the current Global configuration
and any overridden user settings, is evaluated, and used as the current
configuration for the running application.
gep13 added a commit to gep13/ChocolateyGUI that referenced this issue Jan 25, 2021
Only show the output for the config values, not the features as well.
This is a divergence from what chocolatey does, but it also makes the
output much easier to parse, based on the output of the command.
gep13 added a commit that referenced this issue Jan 25, 2021
(GH-602) Initial attempt at getting things working
@gep13
Copy link
Member Author

gep13 commented Jan 25, 2021

This has now been implemented, and is available in the latest package from the Chocolatey MyGet feed (see the readme for more information) and it will ship as part of the 0.18.0 release of Chocolatey GUI.

Chocolatey GUI has always had a data.db file in the users appdata folder:

image

which housed all the user specific configuration for Chocolatey GUI.

With this change, there is now also another data.db file, located in the common appdata folder

image

which will house all the global defaults for the Chocolatey GUI configuration.

Opening Chocolatey GUI and using the Settings screen will always update/edit the configuration within the user specific data.db file:

image

However, using the chocolateyguicli command, it is now possible to list out, and modify both the global configuration and the effective user specific configuration.

For example, running:

chocolateyguicli feature list

will list the current effective configuration for the currently logged in user:

image

and running:

chocolateyguicli feature list --global

Will show the global configuration that is in place for all users:

image

In these examples, you will see that the currently logged in user has modified their setting to enable the ShowConsoleOutput feature, while it is disabled globally. Overriding settings on a per user basis, is allowed by default, but this can be turned off using the AllowNonAdminAccessToSettings, while also using the Chocolatey GUI Licensed Extension.

While signed into a computer as a non-administrator user (assuming it is allowed) a user can modify configuration through the chocolateyguicli, as shown here:

image

However, any attempt to modify the global settings, will result in an error:

image

While logged in as a non-administrator user, with the Chocolatey GUI Extension installed and the AllowNonAdminAccessToSettings feature disabled, any attempt to modify the current settings with the chocolateyguicli will result in an error:

image

In addition, access to settings through the UI will not be possible:

image

In terms of easily parsing the current features and config for Chocolatey GUI, you can use the following commands:

chocolateyguicli feature list -r

image

And:

chocolateyguicli config list -r

image

NOTE: The decision to place the global configuration into the chocolatey.config file was not followed, since it made more sense to continue with the data.db approach, which is currently what is used for the user specific information.

@gep13 gep13 closed this as completed Jan 25, 2021
@gep13 gep13 changed the title Global Chocolatey GUI settings Provide ability to set configuration at the machine level, rather than just at user level Mar 8, 2021
@gep13 gep13 removed Customer Bug reported or feature requested by a licensed customer of Chocolatey Pro/Business Issues only relevant for Pro or Business customers labels Mar 8, 2021
@choco-bot
Copy link

🎉 This issue has been resolved in version 0.18.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issues that introduce new functionality to the project, instead of updating existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants