Suppress history when running user authorization action in RoleElevationDialog

RBAC check sometimes runs after the action that is being checked. This results in the status bar being cleared if the RBAC check passes.

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
Danilo Del Busso 2023-04-28 10:11:31 +01:00
parent d221ae7d61
commit 4a1c13c6b2
No known key found for this signature in database

View File

@ -94,7 +94,7 @@ namespace XenAdmin.Dialogs
{
Exception delegateException = null;
log.Debug("Testing logging in with the new credentials");
DelegatedAsyncAction loginAction = new DelegatedAsyncAction(connection,
var loginAction = new DelegatedAsyncAction(connection,
Messages.AUTHORIZING_USER,
Messages.CREDENTIALS_CHECKING,
Messages.CREDENTIALS_CHECK_COMPLETE,
@ -108,7 +108,7 @@ namespace XenAdmin.Dialogs
{
delegateException = ex;
}
});
}, true);
using (var dlg = new ActionProgressDialog(loginAction, ProgressBarStyle.Marquee) {ShowTryAgainMessage = false})
dlg.ShowDialog(this);