mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Merge pull request #739 from MihaelaStoica/CA-188017
CA-188017: When checking credentials on the Health Check dialog, disp…
This commit is contained in:
commit
54aa8ae239
@ -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)
|
||||
|
9
XenModel/Messages.Designer.cs
generated
9
XenModel/Messages.Designer.cs
generated
@ -16265,6 +16265,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This user is not authorized to access this server..
|
||||
/// </summary>
|
||||
public static string HEALTH_CHECK_USER_HAS_NO_PERMISSION_TO_CONNECT {
|
||||
get {
|
||||
return ResourceManager.GetString("HEALTH_CHECK_USER_HAS_NO_PERMISSION_TO_CONNECT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This user is not authorized to perform Health Check operations..
|
||||
/// </summary>
|
||||
|
@ -5749,6 +5749,9 @@ Click Configure HA to alter the settings displayed below.</value>
|
||||
<data name="HEALTH_CHECK_AUTHENTICATION_INVALID_CREDENTIALS" xml:space="preserve">
|
||||
<value>Invalid username or password. Please try again.</value>
|
||||
</data>
|
||||
<data name="HEALTH_CHECK_USER_HAS_NO_PERMISSION_TO_CONNECT" xml:space="preserve">
|
||||
<value>This user is not authorized to access this server.</value>
|
||||
</data>
|
||||
<data name="HEALTH_CHECK_USER_NOT_AUTHORIZED" xml:space="preserve">
|
||||
<value>This user is not authorized to perform Health Check operations.</value>
|
||||
</data>
|
||||
|
Loading…
Reference in New Issue
Block a user