diff --git a/XenAdmin/Dialogs/RoleSelectionDialog.cs b/XenAdmin/Dialogs/RoleSelectionDialog.cs index d13fbdba0..763f2a853 100644 --- a/XenAdmin/Dialogs/RoleSelectionDialog.cs +++ b/XenAdmin/Dialogs/RoleSelectionDialog.cs @@ -82,7 +82,9 @@ namespace XenAdmin.Dialogs } // Get the list of roles off the server and arrange them into rank - var serverRoles = connection.Cache.Roles.Where(r => r.subroles.Count > 0).OrderBy(r => r).Reverse().ToList(); + var serverRoles = connection.Cache.Roles + .Where(r => (!Helpers.Post82X(connection) || !r.is_internal) && r.subroles.Count > 0) + .OrderBy(r => r).Reverse().ToList(); _subjectsPerRole = new Dictionary>(); foreach (Role role in serverRoles) diff --git a/XenModel/Actions/AD/AddRemoveRolesAction.cs b/XenModel/Actions/AD/AddRemoveRolesAction.cs index f931cf038..706e06cb7 100644 --- a/XenModel/Actions/AD/AddRemoveRolesAction.cs +++ b/XenModel/Actions/AD/AddRemoveRolesAction.cs @@ -63,7 +63,9 @@ namespace XenAdmin.Actions protected override void Run() { - var serverRoles = Connection.Cache.Roles.Where(r => r.subroles.Count > 0).ToList(); + var serverRoles = Connection.Cache.Roles + .Where(r => (!Helpers.Post82X(Connection) || !r.is_internal) && r.subroles.Count > 0) + .ToList(); var toAdd = serverRoles.Where(role => _newRoles.Contains(role) && !subject.roles.Contains(new XenRef(role.opaque_ref))).ToList();