- LocationInfo record holds five location fields (SiteUrl, SiteTitle, ObjectTitle, ObjectUrl, ObjectType) - ConsolidatedPermissionEntry record holds key fields plus IReadOnlyList<LocationInfo> Locations - LocationCount computed property returns Locations.Count
22 lines
713 B
C#
22 lines
713 B
C#
namespace SharepointToolbox.Core.Models;
|
|
|
|
/// <summary>
|
|
/// A consolidated permission row produced by grouping UserAccessEntry rows
|
|
/// that share the same (UserLogin, PermissionLevel, AccessType, GrantedThrough) key.
|
|
/// All distinct locations for that key are collected into <see cref="Locations"/>.
|
|
/// </summary>
|
|
public record ConsolidatedPermissionEntry(
|
|
string UserDisplayName,
|
|
string UserLogin,
|
|
string PermissionLevel,
|
|
AccessType AccessType,
|
|
string GrantedThrough,
|
|
bool IsHighPrivilege,
|
|
bool IsExternalUser,
|
|
IReadOnlyList<LocationInfo> Locations
|
|
)
|
|
{
|
|
/// <summary>Convenience count — equals Locations.Count.</summary>
|
|
public int LocationCount => Locations.Count;
|
|
}
|