- UserAccessEntry, AccessType, IUserAccessAuditService, IGraphUserSearchService - UACC-01, UACC-02 requirements marked complete - STATE.md updated with position and decisions - ROADMAP.md Phase 7 progress updated (1/8 plans)
3.9 KiB
phase, plan, subsystem, tags, dependency_graph, tech_stack, key_files, decisions, metrics
| phase | plan | subsystem | tags | dependency_graph | tech_stack | key_files | decisions | metrics | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 07-user-access-audit | 01 | core-models-interfaces |
|
|
|
|
|
|
Phase 7 Plan 01: Data Models and Service Interfaces Summary
One-liner: Contract layer with UserAccessEntry record (12-field denormalized model), AccessType enum, IUserAccessAuditService, IGraphUserSearchService, and GraphUserResult — zero-error foundation for all downstream Phase 7 plans.
What Was Built
Three files establishing the Wave 1 contract layer for the User Access Audit feature:
-
UserAccessEntry.cs — C# record with 12 positional properties representing one row in the audit results grid. Includes AccessType enum (Direct/Group/Inherited), pre-computed IsHighPrivilege and IsExternalUser flags, and SiteUrl/SiteTitle for multi-site grouping.
-
IUserAccessAuditService.cs — Service interface with single method
AuditUsersAsyncthat accepts a session manager, list of target user login names, list of sites, scan options, progress reporter, and cancellation token. ReturnsIReadOnlyList<UserAccessEntry>. -
IGraphUserSearchService.cs — Service interface with
SearchUsersAsyncfor Graph API people-picker autocomplete, plus theGraphUserResultrecord (DisplayName, UserPrincipalName, nullable Mail).
Tasks
| # | Task | Status | Commit |
|---|---|---|---|
| 1 | Create UserAccessEntry model and AccessType enum | Done | e08df0f |
| 2 | Create IUserAccessAuditService and IGraphUserSearchService interfaces | Done | 1a6989a |
Decisions Made
-
Denormalized record design — Each UserAccessEntry row represents one user + one object + one permission level. This avoids nested object graphs and allows direct DataGrid binding and CSV export without flattening logic.
-
Pre-computed flags — IsHighPrivilege (Full Control, Site Collection Administrator) and IsExternalUser (#EXT# in login) are computed during the scan pass, not at display time. This keeps the ViewModel simple and the grid row data self-contained.
-
GraphUserResult co-located with interface — Defined in the same file as IGraphUserSearchService since it is exclusively used as the return type of that interface. No separate file needed.
Deviations from Plan
None — plan executed exactly as written.
Verification
dotnet build SharepointToolbox/SharepointToolbox.csproj— 0 errors, 0 warnings- UserAccessEntry.cs: record with 12 fields + AccessType enum confirmed
- IUserAccessAuditService.cs: AuditUsersAsync with correct 6-parameter signature confirmed
- IGraphUserSearchService.cs: SearchUsersAsync with 4 parameters + GraphUserResult record confirmed
Self-Check: PASSED
Files confirmed present:
- FOUND: SharepointToolbox/Core/Models/UserAccessEntry.cs
- FOUND: SharepointToolbox/Services/IUserAccessAuditService.cs
- FOUND: SharepointToolbox/Services/IGraphUserSearchService.cs
Commits confirmed: