mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-24 22:06:59 +01:00
CP-38893: Make internal roles unavailable for selection.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
50dd22f4da
commit
6aec4ea281
@ -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<Role, List<Subject>>();
|
||||
|
||||
foreach (Role role in serverRoles)
|
||||
|
@ -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>(role.opaque_ref))).ToList();
|
||||
|
Loading…
Reference in New Issue
Block a user