diff --git a/XenAdmin/Dialogs/HealthCheck/HealthCheckSettingsDialog.cs b/XenAdmin/Dialogs/HealthCheck/HealthCheckSettingsDialog.cs index ffdfac0b0..22e9c575a 100644 --- a/XenAdmin/Dialogs/HealthCheck/HealthCheckSettingsDialog.cs +++ b/XenAdmin/Dialogs/HealthCheck/HealthCheckSettingsDialog.cs @@ -335,6 +335,15 @@ namespace XenAdmin.Dialogs.HealthCheck if (elevatedSession != null && (elevatedSession.IsLocalSuperuser || SessionAuthorized(elevatedSession, Role.ValidRoleList("pool.set_health_check_config", connection)))) passedRbacChecks = true; } + catch (Failure f) + { + if (f.ErrorDescription.Count > 0 && f.ErrorDescription[0] == Failure.RBAC_PERMISSION_DENIED) + { + // we use a different error message here from the standard one in friendly names + throw new Exception(Messages.HEALTH_CHECK_USER_HAS_NO_PERMISSION_TO_CONNECT); + } + throw; + } finally { if (elevatedSession != null) diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index 669db8d42..505dcf31b 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -16265,6 +16265,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to This user is not authorized to access this server.. + /// + public static string HEALTH_CHECK_USER_HAS_NO_PERMISSION_TO_CONNECT { + get { + return ResourceManager.GetString("HEALTH_CHECK_USER_HAS_NO_PERMISSION_TO_CONNECT", resourceCulture); + } + } + /// /// Looks up a localized string similar to This user is not authorized to perform Health Check operations.. /// diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index bc1807464..5d7e015f8 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -5749,6 +5749,9 @@ Click Configure HA to alter the settings displayed below. Invalid username or password. Please try again. + + This user is not authorized to access this server. + This user is not authorized to perform Health Check operations.