docs(src): add missing XML docs and strip tracking-ID comments
Sweep of 203 source files resolving CommentChecker findings: add <summary>/<param>/<returns>/<inheritdoc> where missing, and remove resolved task/issue tracking markers (Tests-NNN, Worker-NNN, Server-NNN, Task N) from code comments. Comment/doc-only — no logic changes. Server+Tests build clean under TreatWarningsAsErrors.
This commit is contained in:
@@ -16,6 +16,7 @@ internal static class DashboardGroupRoleMapping
|
||||
/// </summary>
|
||||
/// <param name="groups">The collection of LDAP groups the user belongs to.</param>
|
||||
/// <param name="groupToRole">The mapping from group names to dashboard role names.</param>
|
||||
/// <returns>The distinct dashboard roles the groups map to, or an empty list if none match.</returns>
|
||||
internal static IReadOnlyList<string> MapGroupsToRoles(
|
||||
IEnumerable<string> groups,
|
||||
IReadOnlyDictionary<string, string> groupToRole)
|
||||
@@ -30,25 +31,6 @@ internal static class DashboardGroupRoleMapping
|
||||
{
|
||||
string normalizedGroup = group.Trim();
|
||||
|
||||
// Lookup precedence (Server-040): the full literal group string is
|
||||
// tried first; only if that misses do we fall back to the leading
|
||||
// RDN value (e.g. "GwAdmin" extracted from
|
||||
// "ou=GwAdmin,ou=groups,..."). The map's comparer is
|
||||
// OrdinalIgnoreCase (see DashboardOptions.GroupToRole), so e.g.
|
||||
// "GwAdmin" and "gwadmin" both match.
|
||||
//
|
||||
// Review C1: with the shared ZB.MOM.WW.Auth.Ldap provider, groups
|
||||
// arrive here already stripped to short RDN names (the library calls
|
||||
// FirstRdnValue before returning them). So through the live login path
|
||||
// the full-string branch only ever sees short names and the RDN
|
||||
// fallback is effectively a no-op — they collapse to the same key.
|
||||
// The fallback is retained because this mapping is also reachable
|
||||
// directly via the IGroupRoleMapper<string> seam (DashboardGroupRoleMapper),
|
||||
// where a caller could still pass a full DN. CONSEQUENCE: configuring a
|
||||
// full-DN GroupToRole *key* (e.g. "ou=GwAdmin,ou=groups,...") is
|
||||
// UNSUPPORTED with the shared library — the incoming group is a short
|
||||
// name, so it will never equal a full-DN key. Keep GroupToRole keys as
|
||||
// short group names.
|
||||
if (groupToRole.TryGetValue(normalizedGroup, out string? mapped)
|
||||
|| groupToRole.TryGetValue(ExtractFirstRdnValue(normalizedGroup), out mapped))
|
||||
{
|
||||
@@ -61,6 +43,7 @@ internal static class DashboardGroupRoleMapping
|
||||
|
||||
/// <summary>Extracts the first RDN value from a distinguished name.</summary>
|
||||
/// <param name="distinguishedName">The LDAP distinguished name.</param>
|
||||
/// <returns>The value of the first RDN component, or the input unchanged if it contains no '=' separator.</returns>
|
||||
internal static string ExtractFirstRdnValue(string distinguishedName)
|
||||
{
|
||||
int equalsIndex = distinguishedName.IndexOf('=');
|
||||
|
||||
Reference in New Issue
Block a user