mirror of
https://github.com/reactos/reactos
synced 2025-10-06 00:12:51 +02:00
- Respect system policies for showing or hiding: * Security dialog "Lock Workstation", "Log Off", "Shut Down", "Change Password", "Task Manager" buttons; * "Log Off" entry in the Shutdown dialog; - Disable the "Shut Down" Security dialog button, and the "Stand by", "Shut down" entries in the Shutdown dialog, if the logged user doesn't have the SeShutdownPrivilege. - Add other missing `WLX_SHUTDOWN_STATE_*` shutdown flags that are supported by Windows. - Improve the retrieval of shutdown options to be displayed in the "Shut Down" dialog. In particular, don't hardcode any sort of defaults, but let them come from what the user can do (Is logoff allowed? Does (s)he have the rights to shutdown/reboot? etc.). If no shutdown options are available, then simply don't display the dialog! - Don't hardcode the default selected shutdown option. Either it comes from the user's registry and is valid (i.e. corresponds to an existing shutdown option in the dialog), otherwise, fall back to the first option in the dialog. In particular this means: * when opening the "Shut Down" dialog from the C-A-D Security dialog, by default we will select the "Log Off" option, or whatever the user last selected; * when opening the dialog from the "Turn Off" Start Menu item, default to the "Shut down" option, or whatever the user last selected. * when opening the dialog from the C-A-D "Log On" dialog (no user is logged in), the "Shut down" option will also be selected, or whatever the system operator last selected. - For the shell-invokable `ShellShutdownDialog()` function, implement support for using a custom display user name, or the one in the `"Logon User Name"` registry value saved by `WlxActivateUserShell()`. Plus, the 3rd parameter specifies the list of shutdown options to *exclude* from the options list.