Bug Fix: Update Admins blocked all Admins
The updated subject hash was case-sensitive when it should have been reinitialized with the OrdinalIgnoreCase string comparer.
This commit is contained in:
@@ -91,7 +91,7 @@ namespace Disco.Services.Authorization.Roles
|
|||||||
|
|
||||||
// Update State
|
// Update State
|
||||||
_AdministratorToken.SubjectIds = SubjectIds.ToList();
|
_AdministratorToken.SubjectIds = SubjectIds.ToList();
|
||||||
_AdministratorToken.SubjectIdHashes = new HashSet<string>(SubjectIds.Select(i => i.ToLower()));
|
_AdministratorToken.SubjectIdHashes = new HashSet<string>(SubjectIds, StringComparer.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace Disco.Services.Authorization.Roles
|
|||||||
return new RoleToken()
|
return new RoleToken()
|
||||||
{
|
{
|
||||||
Role = Role,
|
Role = Role,
|
||||||
SubjectIdHashes = new HashSet<string>(sg.Select(i => i.ToLower()), StringComparer.OrdinalIgnoreCase),
|
SubjectIdHashes = new HashSet<string>(sg, StringComparer.OrdinalIgnoreCase),
|
||||||
SubjectIds = sg.ToList(),
|
SubjectIds = sg.ToList(),
|
||||||
Claims = Claims
|
Claims = Claims
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user