Added new feature : display the file/folder and link of a SharingLink object in the permissions reports.
This commit is contained in:
@@ -13,7 +13,10 @@ public record ConsolidatedPermissionEntry(
|
||||
string GrantedThrough,
|
||||
bool IsHighPrivilege,
|
||||
bool IsExternalUser,
|
||||
IReadOnlyList<LocationInfo> Locations
|
||||
IReadOnlyList<LocationInfo> Locations,
|
||||
string? TargetUrl = null,
|
||||
string? TargetLabel = null,
|
||||
string? SharingLinkType = null
|
||||
)
|
||||
{
|
||||
/// <summary>Convenience count — equals Locations.Count.</summary>
|
||||
|
||||
@@ -14,5 +14,10 @@ public record PermissionEntry(
|
||||
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
|
||||
bool WasAutoElevated = false, // Set to true when site admin was auto-granted to access this entry
|
||||
// Resolved target for Limited Access System Group For Web/List and SharingLinks
|
||||
// groups — populated when GrantedThrough is one of those system groups, null otherwise.
|
||||
string? TargetUrl = null,
|
||||
string? TargetLabel = null,
|
||||
string? SharingLinkType = null // OrganizationEdit | OrganizationView | AnonymousEdit | AnonymousView | etc.
|
||||
);
|
||||
|
||||
@@ -41,6 +41,9 @@ public class SimplifiedPermissionEntry
|
||||
public string PermissionLevels => Inner.PermissionLevels;
|
||||
public string GrantedThrough => Inner.GrantedThrough;
|
||||
public string PrincipalType => Inner.PrincipalType;
|
||||
public string? TargetUrl => Inner.TargetUrl;
|
||||
public string? TargetLabel => Inner.TargetLabel;
|
||||
public string? SharingLinkType => Inner.SharingLinkType;
|
||||
|
||||
public SimplifiedPermissionEntry(PermissionEntry entry)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using SharepointToolbox.Core.Helpers;
|
||||
|
||||
namespace SharepointToolbox.Core.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Resolved target for a SharePoint system group (Limited Access For Web/List or SharingLinks).
|
||||
/// Carries the human-readable label, the navigable URL, and (for sharing links) the link type
|
||||
/// so the export layer can render a clickable link in the Granted Through cell.
|
||||
/// </summary>
|
||||
public record SystemGroupTarget(
|
||||
SystemGroupKind Kind,
|
||||
string Label, // e.g. "MyList" | "Shared Documents/Folder/File.docx" | "Site - HR"
|
||||
string Url, // Navigable URL of the targeted resource
|
||||
string? LinkType = null // For SharingLinks: "OrganizationEdit", "AnonymousView", etc.
|
||||
);
|
||||
@@ -29,5 +29,8 @@ public record UserAccessEntry(
|
||||
AccessType AccessType, // Direct | Group | Inherited
|
||||
string GrantedThrough, // "Direct Permissions" | "SharePoint Group: Members" etc.
|
||||
bool IsHighPrivilege, // True for Full Control, Site Collection Administrator
|
||||
bool IsExternalUser // True if login contains #EXT#
|
||||
bool IsExternalUser, // True if login contains #EXT#
|
||||
string? TargetUrl = null, // Resolved URL when GrantedThrough is a Limited Access / SharingLinks system group
|
||||
string? TargetLabel = null, // Resolved name (list title / file name / web title)
|
||||
string? SharingLinkType = null // OrganizationEdit | OrganizationView | AnonymousEdit | ...
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user