mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01: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
@@ -276,6 +276,18 @@ void run_settings_window()
|
||||
settings_elevatedStatus = L"false";
|
||||
}
|
||||
|
||||
bool isAdmin{ get_general_settings().isAdmin };
|
||||
std::wstring settings_isUserAnAdmin;
|
||||
|
||||
if (isAdmin)
|
||||
{
|
||||
settings_isUserAnAdmin = L"true";
|
||||
}
|
||||
else
|
||||
{
|
||||
settings_isUserAnAdmin = L"false";
|
||||
}
|
||||
|
||||
std::wstring executable_args = L"\"";
|
||||
executable_args.append(executable_path);
|
||||
executable_args.append(L"\" ");
|
||||
@@ -288,6 +300,8 @@ void run_settings_window()
|
||||
executable_args.append(settings_theme);
|
||||
executable_args.append(L" ");
|
||||
executable_args.append(settings_elevatedStatus);
|
||||
executable_args.append(L" ");
|
||||
executable_args.append(settings_isUserAnAdmin);
|
||||
|
||||
BOOL process_created = false;
|
||||
if (is_process_elevated())
|
||||
|
||||
Reference in New Issue
Block a user