- AppSettings.AutoTakeOwnership bool property defaulting to false - PermissionEntry.WasAutoElevated optional param (default false, last position) - SettingsService.SetAutoTakeOwnershipAsync persists toggle - IOwnershipElevationService interface + OwnershipElevationService wrapping Tenant.SetSiteAdmin - SettingsViewModel.AutoTakeOwnership property loads and persists via SetAutoTakeOwnershipAsync - DI registration in App.xaml.cs (Phase 18 section) - 8 new tests: models, persistence, service, viewmodel
19 lines
923 B
C#
19 lines
923 B
C#
namespace SharepointToolbox.Core.Models;
|
|
|
|
/// <summary>
|
|
/// Flat record representing one permission assignment on a SharePoint object.
|
|
/// Mirrors the $entry object built by the PowerShell Generate-PnPSitePermissionRpt function.
|
|
/// </summary>
|
|
public record PermissionEntry(
|
|
string ObjectType, // "Site Collection" | "Site" | "List" | "Folder"
|
|
string Title,
|
|
string Url,
|
|
bool HasUniquePermissions,
|
|
string Users, // Semicolon-joined display names
|
|
string UserLogins, // Semicolon-joined login names
|
|
string PermissionLevels, // Semicolon-joined role names (Limited Access already removed)
|
|
string GrantedThrough, // "Direct Permissions" | "SharePoint Group: <name>"
|
|
string PrincipalType, // "SharePointGroup" | "User" | "External User"
|
|
bool WasAutoElevated = false // Set to true when site admin was auto-granted to access this entry
|
|
);
|