mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
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:
committed by
GitHub
parent
3dc61962de
commit
a13c8cb71e
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user