Autoupdate option visible only for administrators group (#2945)

* Added isAdmin value to Settings.UI. Changed elevation check to user group check for AutoDownload toggle
This commit is contained in:
Yevhenii Holovachov
2020-05-14 12:36:27 +03:00
committed by GitHub
parent 3dc61962de
commit a13c8cb71e
7 changed files with 52 additions and 9 deletions

View File

@@ -40,6 +40,8 @@ namespace Microsoft.PowerToys.Settings.UI.Views
public static bool IsElevated { get; set; }
public static bool IsUserAnAdmin { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ShellPage"/> class.
/// Shell page constructor.
@@ -77,6 +79,11 @@ namespace Microsoft.PowerToys.Settings.UI.Views
IsElevated = isElevated;
}
public void SetIsUserAnAdmin(bool isAdmin)
{
IsUserAnAdmin = isAdmin;
}
public void Refresh()
{
shellFrame.Navigate(typeof(GeneralPage));